[CentOS] crontab and/or anacrontab ?

Timothy Murphy gayleard at eircom.net
Fri Mar 12 00:28:39 UTC 2010

Tony Molloy wrote:

>> Actually, I wouldn't mind in the slightest if cron.daily failed to run
>> because the machine was down at the nominated time.
>> It is not as though my world depends on cron.daily running every day.
>> I certainly would not run another program in case that happened.
> You're world may not depend on it but those of us who run 10's of servers
> need
> a bit more reassurance.  ;-)

The scenario is apparently that there is a power outage
at exactly the time cron.daily is running.
The machine stops and then starts again
(if it doesn't then it doesn't matter whether anacron is running or not).
In my experience the probability of this occurring is close to zero,
and it wouldn't really matter if logrotate or something like that
was put off for one night.
What are you running through cron.daily on your 10's of servers
that is so vital?

>> I see that there are actually files /var/spool/anacron/cron.daily , etc,
>> on my machine listing the last day anacron ran (20100311)
>> But it seems that this information is not used, in my case,
>> I don't know why.
>> As I said, this duplication seems to have started recently,
>> and I have taken no action on this machine for months
>> apart from running "sudo yum update",
>> so I assume some update had this effect.

> On my laptop
> #  rpm -qa --last | grep anacron
> gives
> cronie-anacron-1.4.3-4.fc12                   Sat Feb 27 11:05:52 2010

In my case,

[tim at helen ~]$ rpm -qa --last | grep anacron
anacron-2.3-45.el5.centos                     Fri 07 Mar 2008 08:36:23 PM 

Note the year (2008).
It seems anacron has not been updated for ages,
although I run "yum update" every day.

I'll try turning off anacron on the first machine,
and see what happens.
The duplication issue is not really a problem -
I just wondered (and wonder) why it is happening.

Timothy Murphy  
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

More information about the CentOS mailing list