[CentOS] crontab and/or anacrontab ?

Timothy Murphy gayleard at eircom.net
Thu Mar 11 13:43:05 UTC 2010

Alexander Dalloz wrote:

> It is pretty "normal" to have them both on CentOS.
> # rpm -qf /etc/crontab
> crontabs-1.10-8
> # rpm -qf /etc/anacrontab
> anacron-2.3-45.el5
> man 8 anacron
>        Anacron  can  be  used  to  execute  commands  periodically, with a
> frequency specified in days. Unlike cron(8), it does not assume
> that the machine is running continuously.  Hence, it  can  be used
> on machines that aren’t running 24 hours a day, to control daily,
> weekly, and monthly jobs that are usually controlled by cron."
> This should make obvious why there are both of the crontabs and in which
> situations anacron runs through his tab and when cron runs through his.

Sorry, it's not at all clear to me.
The machine in question is running all the time.
Are you saying that anacron should be turned off in this case,
presumably by "chkconfig anacron off"?

1) I didn't turn it on, so presumably anacron runs by default under CentOS.

2) As far as I can tell, the duplication only started recently,
when I noticed that I was getting logwatch messages twice a day.

I have another CentOS-5.4 machine, which is also running all the time,
and as far as I can see there is no duplication on that machine.

To repeat my question, is one meant to turn anacron off
if the machine is running all the time?
Or is anacron meant to determine this in some way?
And if so, how?

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