Quote:
Originally Posted by unSpawn
Logrotate scripts are run by the 'logrotate' binary.
Logrotate is run as a /etc/cron.daily/ cronjob.
/etc/cron.daily is referenced in /etc/crontab.
See 'man 5 crontab' for explanation of time and date fields.
|
I am using Centos 6, which unfortunately has an empty /etc/crontab file by default. I cannot seem to find any documentation that describes how /etc/cron.daily/logrotate is being called in Centos 6.
Edit: After reading the crontab man page it appears that the cron.daily, cron.weekly, and cron.monthly are now called from /etc/anacrontab in Centos 6:
Code:
# /etc/anacrontab: configuration file for anacron
# See anacron(8) and anacrontab(5) for details.
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45
# the jobs will be started during the following hours only
START_HOURS_RANGE=3-22
#period in days delay in minutes job-identifier command
1 5 cron.daily nice run-parts /etc/cron.daily
7 25 cron.weekly nice run-parts /etc/cron.weekly
@monthly 45 cron.monthly nice run-parts /etc/cron.monthly
Also in the man page for anacrontab it states:
Quote:
...will start all regular jobs only between 6:00 and 8:00. There is added RANDOM_DELAY which will be maximally 30 minutes. Jobs will be running in queue. After one finish, then next will start.
|
Which explains why my syslog files were starting and ending at completely random intervals. Seems like a kludgey change.