On 10/4/20 7:11 PM, Alex wrote:
I have a fedora32 system and would like the maillog to rotate exactly at a specific time. How do I do that? It used to be that I could create a crontab entry but now there appears to be this timer service, including /usr/lib/systemd/system/logrotate.timer included with the package that appear to control that.
Yes, so if you want to change the time it runs, then copy that file to /etc/systemd. Edit it and remove the "AccuracySec=1h" line and edit the "OnCalendar=daily" to set the time you want it to run.
See "man systemd.time" for details on the time formats. For example "OnCalendar=*-*-* 01:00:00 would run it every day at 1AM.
After you're finished, run "systemctl daemon-reload" so that the new file is picked up.
However, there doesn't seem to be a timer entry in systemctl output. Ideas on how to get started would be appreciated.
It seems that the triggering timer isn't mentioned in the log, but you should see the log entries for running logrotate.
"journalctl -b -u logrotate" will list only those. _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx