LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   logrotate cron (https://www.linuxquestions.org/questions/linux-general-1/logrotate-cron-4175611783/)

m@o_614 08-11-2017 03:11 PM

logrotate cron
 
Hi

Do you guys have any idea how to set up the logrotate cron to not rotate when there is high traffic in a server Linux RedHat6?

Thanks in advance

michaelk 08-11-2017 04:56 PM

By default logrotate runs from cron.daily which defaults to START_HOURS_RANGE=3-22 so assuming your server runs 24/7 it should run around 03:xx at whatever timezone your computer is configured.

Code:

1        5        cron.daily                nice run-parts /etc/cron.daily
If want to run logrotate at a specific time then you can add a job to /etc/crontab instead. There are several utilities to measure load and a cron script could be written to check for a certain level and then rotate the logs.


All times are GMT -5. The time now is 02:47 PM.