[plug] Rotating logs on a Workstation...

Leon Brooks leon at brooks.fdns.net
Thu Oct 2 12:04:16 WST 2003


On Thu, 2 Oct 2003 08:27, Trevor Phillips wrote:
> Any idea how it determines what's weekly, and what's daily, and why
> this workstation doesn't have messages and a few others in either?

Mandrake does it in /etc/crontab, Debian is likely to have a /etc/cron.d 
with files called daily, weekly etc in that which is "run-parts'ed" 
from crontab. Here's the chunk out of my crontab:

    01 * * * * root nice -n 19 run-parts /etc/cron.hourly
    02 4 * * * root nice -n 19 run-parts /etc/cron.daily
    22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
    42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly

Translated for the noobs:

Hourly is at *:01 every day, month and weekday.
Daily is at 04:02 every day, month and weekday.
Weekly is at 04:22 every Sunday morning.
Monthly is at 04:42 on the first morning of each month.

For my own stuff I usually keep a file called ~/crontab for my normal 
login and just "crontab crontab" that after editing it. Cron then does 
something run-parts-ish but more intelligent with the files that 
creates in /var/spool/cron/

Cheers; Leon

_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list