Covington, Chris wrote:
Hi all,

How can I make sure that my weekly logrotation occurs on Sunday
morning?

You'll need to change your crontab.

First though, I assume this means you don't want you logs to be rotated dailty as is the default when you emerge logrotate. The dafault is that the /etc/cron.daily/logrotate.cron script is run daily, which rotates your logs.

If that is not what you want, then you'll need to do two things. First, disable the "daily" logrotation:

chmod -x /etc/cron.daily/logrotate.cron

Second, add a new line to your crontab instructing your system to only run the rotation on Sunday mornings (in my example, at 6am).

crontab -e

Add this line:

0 6 * * sun     /usr/sbin/logrotate /etc/logrotate.conf

For more infomation take a look at the crontab man page ("man crontab")

thanks
Chris

Your welcome.

--
gentoo-user@gentoo.org mailing list



Reply via email to