Centos: Rotate log files at midnight
I would like to have logrotate execute at midnight for every script in /etc/logrotate.d, but I cannot seem to find any good information on how this is configured.
|
By default, logrotate should have a shell script in the /etc/cron.daily directory. If you don't have one, mine looks like this:
Code:
#!/bin/sh Code:
include /etc/logrotate.d |
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. |
Quote:
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 Quote:
|
Quote:
Edit:I've not idea if the START_HOURS_RANGE will work as my servers are all Centos 5. |
Quote:
Quote:
|
All times are GMT -5. The time now is 05:03 AM. |