LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 03-02-2007, 11:45 AM   #1
jimmyjiang
Member
 
Registered: Jun 2006
Posts: 132

Rep: Reputation: 15
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
 
Old 03-02-2007, 12:36 PM   #2
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
Maybe this article may help you.
 
Old 03-02-2007, 01:10 PM   #3
jimmyjiang
Member
 
Registered: Jun 2006
Posts: 132

Original Poster
Rep: Reputation: 15
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!
 
Old 03-02-2007, 01:31 PM   #4
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 18, 19, RHL 5.2
Posts: 546

Rep: Reputation: 43
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.

Last edited by wmakowski; 03-02-2007 at 01:33 PM.
 
Old 03-02-2007, 01:35 PM   #5
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 18, 19, RHL 5.2
Posts: 546

Rep: Reputation: 43
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

Last edited by wmakowski; 03-02-2007 at 01:43 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run jobs in /etc/cron.daily? Micro420 Linux - Newbie 4 10-19-2006 02:07 PM
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 01:50 PM
cron scheduling and time change dsschanze Linux - General 3 11-13-2005 04:22 PM
cron.daily runs at the wrong time dwz3591 Linux - Software 2 10-27-2004 09:46 AM
dual entries in cron log for cron.daily cpharvey Linux - General 3 02-27-2003 02:30 PM


All times are GMT -5. The time now is 09:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration