When do entries in cron.daily (and .weekly and .hourly) run, and is it configurable?

I haven't found a definitive answer to this, and am hoping there is one.

I'm running RHEL5 and CentOS 4, but for other distros/platforms would be great, too.

link|improve this question

feedback

5 Answers

up vote 14 down vote accepted

For the distributions you mention:

On CentOS 5.4 (Should be same for RHEL5)

grep run-parts /etc/crontab

01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

So cron.daily runs at 04:02am.

Same on CentOS 4.8

link|improve this answer
1  
Not to be pedantic, but that is a clear case of UUOC - sial.org/howto/shell/useless-cat :D – Zayne S Halsall Apr 26 '10 at 20:41
+1 I originally did the cat only but then realised what I had including in the output wasn't the whole file so just added the grep on as a quick edit. However, not wishing to promote the use of the useless cat I have edited my answer. Thanks – Richard Holloway Apr 27 '10 at 7:40
Is there any reason behind this? I can only assume it'd be the quietest time on the server. – The Pixel Developer May 13 '10 at 14:55
feedback

From the man page:

 Cron also searches for /etc/anacrontab

/etc/anacrontab in my system (Fedora 12) :

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

See also man anacrontab

link|improve this answer
feedback

There is no such facility as far as Solaris is concerned. Just use regular crontab entries for daily tasks.

link|improve this answer
feedback

From /etc/anacrontab on my Ubuntu 9.10 system:

1       5       cron.daily       nice run-parts --report /etc/cron.daily
7       10      cron.weekly      nice run-parts --report /etc/cron.weekly
@monthly        15      cron.monthly nice run-parts --report /etc/cron.monthly
link|improve this answer
feedback

On Ubuntu, you'll find a file /etc/crontab, from where this is configured. I guess it is something similar on RH and Centos.

link|improve this answer
This is the right file for Ubuntu Lucid 10.04 LTS. My default setting is 6:25am for cron.daily. – geekQ Aug 8 '11 at 13:46
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.