#1052000 logrotate systemd timer should run hourly rather than daily

Package:
logrotate
Source:
logrotate
Description:
Log rotation utility
Submitter:
Todd J
Date:
2023-09-15 17:27:03 UTC
Severity:
normal
Tags:
#1052000#5
Date:
2023-09-15 17:25:37 UTC
From:
To:
Dear Maintainer,

"hourly" rotation was added to logrotate in 2019(?).
However, the Debian systemd Timer runs "daily" so "hourly" logrotate jobs
are still only run daily.

Updating /etc/systemd/system/timers.target.wants/logrotate.timer:
...
[Timer]
OnCalendar=hourly
...

should allow "logrotate hourly" to work as expected.

See https://github.com/logrotate/logrotate/issues/249#issuecomment-485829363
"The tricky part is that one needs to change the default cron hook
(or systemd timer) to make hourly actually work as expected."

Thanks!