Red Hat Bugzilla – Bug 150228
Unfortunate interaction between anacron and crontab
Last modified: 2007-11-30 17:11:01 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Description of problem:
The /etc/crontab installed has the following :
02 4 * * * root run-parts /etc/cron.daily
The /etc/anacrontab has the following :
1 65 cron.daily run-parts /etc/cron.daily
My understanding is that this means that anacron will run
/etc/cron.daily on the first reboot of the day, even if crond had
already run them that day.
Same thing for cron.weekly, cron.monthly.
The solution is either
a) Use anacron to run /etc/cron.daily etc
b) Add a note somewhere that states that cron.daily etc could be run
more then once per period
c) Modify crontab so that it informs anacron that a job has been run
The problem with a) is that anacron has no concept of months.
cron.monthly is run every 30 days, which isn't what is wanted.
The problem with b) is that it breaks compatibility with older
versions of Red Hat.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Reproducing this involves playing with the date on the computer.
Created attachment 111637 [details]
Patch to crontab
I was just poking around and noticed the 0anacrons in /etc/cron.daily,
cron.weekly and cron.monthly.
So I guess that does roughly the same thing, though 00-logwatch jumps
in before them.
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.
a/ it's know bug, I'll work on it and many others.
b/ run-parts is runned from cron(tab) every day and run-parts looks in
cron.daily. Then run jobs from cron.daily (if they don't have lock - anacron
doesn't run twice).