#656835 cron: align /etc/cron.{daily, hourly, monthly, weekly} with @daily, @hourly, @monthly, @weekly

Package:
cron
Source:
cron
Description:
process scheduling daemon
Submitter:
Christoph Anton Mitterer
Date:
2023-08-14 15:03:01 UTC
Severity:
wishlist
#656835#5
Date:
2012-01-22 01:56:01 UTC
From:
To:
Hi.

Currently the directories /etc/cron.{daily,hourly,monthly,weekly} are executed
like this:
17 *	* * *	root    cd / && run-parts --report /etc/cron.hourly
25 6	* * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6	* * 7	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6	1 * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
as defined in /etc/crontab.

The crontab keywords @daily,@hourly,@monthly,@weekly are defined like this:
              @monthly       Run once a month, "0 0 1 * *".
              @weekly        Run once a week, "0 0 * * 0".
              @daily         Run once a day, "0 0 * * *".
              @hourly        Run once an hour, "0 * * * *".


Perhaps I just don't see the reason, but is there any that these are not aligned (i.e. all at minute 0
and - if applicable - hour 0, day 1)?

Cheers,
Chris.

#656835#10
Date:
2013-01-28 10:48:31 UTC
From:
To:
I believe this is done to not race with another periodic job. I.e. the
jobs in /etc/cron.daily should not be executed at the same time as
/etc/cron.weekly. See #23023 for a real-world example on this.