LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   change cron.daily run time (https://www.linuxquestions.org/questions/red-hat-31/change-cron-daily-run-time-533960/)

jimmyjiang 03-02-2007 11:45 AM

change cron.daily run time
 
hi,
I have a scrpit in /etc/logroate.d, and it runs daily, how can I set the time it runs, that mean I have to change the cron.daily run time right? ( I don't want it run in crontab )
thanks!
jimmy

reddazz 03-02-2007 12:36 PM

Maybe this article may help you.

jimmyjiang 03-02-2007 01:10 PM

I can't find /var/spool/cron/lastrun/cron.daily at my redhat as 4,but I do find /etc/crontab ,I can edit start time there, but for detail to very script inside cron.daily.
thanks!

wmakowski 03-02-2007 01:31 PM

SUSE has a slightly different setup than RedHat for cron jobs. I would point you to the RedHat docs, but for some reason the documentation is temporarily unavailable. The file /etc/crontab controls execution of system jobs. To understand the layout of the crontab file you should look at the man pages on crontab. Be sure to read both sections 1 and 5 to understand how it works. Individual users can also have their own crontab file depending on settings.

The files in /etc/logrotate.d are not scripts they are configuration files for logrotate. The actual logrotate script is in /etc/cron.daily. Note that if you change the runtime for /etc/cron.daily you are also going to change the runtime for the other scripts in that directory.

Bill

ps - Jimmy you should set your Distribution in your profile. Go to My LQ at the top of the page to get to your profile.

wmakowski 03-02-2007 01:35 PM

Looks like you were posting when I was writing. The logs for cron are kept in /var/log. The file cron shows the details of when jobs were run.

Bill


All times are GMT -5. The time now is 02:04 AM.