[CentOS] cron.hourly runs twice

Timothy Murphy gayleard at eircom.net
Wed Mar 17 13:21:37 UTC 2010


Jeff wrote:

>> For some reason I cannot fathom,
>> cron.hourly runs twice each hour
>> on one of my two CentOS-5.4 systems,

> hourly, daily, weekly and monthly jobs are configured in /etc/crontab.
> What's your /etc/crontab look like? Are you seeing the same behavior
> for daily/weekly jobs? Have you simply tried restarting the cron
> service?

I have indeed - several times,
as well as re-booting the system.
My crontab is the original, I think:
---------------------------------
[root at helen tim]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
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
---------------------------------
/etc/anacrontab reads:
---------------------------------
[root at helen tim]# cat /etc/anacrontab 
# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

1       65      cron.daily              run-parts /etc/cron.daily
7       70      cron.weekly             run-parts /etc/cron.weekly
30      75      cron.monthly            run-parts /etc/cron.monthly
---------------------------------
I see now that /etc/cron.daily also runs twice:
---------------------------------
Mar 16 04:01:02 helen crond[22696]: (root) CMD (run-parts /etc/cron.hourly)
Mar 16 04:01:02 helen crond[22699]: (root) CMD (run-parts /etc/cron.hourly)
Mar 16 04:02:01 helen crond[22723]: (root) CMD (run-parts /etc/cron.daily)
Mar 16 04:02:01 helen crond[22724]: (root) CMD (run-parts /etc/cron.daily)
Mar 16 04:02:01 helen anacron[22742]: Updated timestamp for job `cron.daily' 
to 2010-03-16
Mar 16 04:02:11 helen anacron[23204]: Updated timestamp for job `cron.daily' 
to 2010-03-16
---------------------------------
crond is only running once:
---------------------------------
[root at helen tim]# ps aux | grep cron
root      5978  0.0  0.0  61152   732 pts/1    S+   12:15   0:00 grep cron
root     16700  0.0  0.0  74816  1236 ?        Ss   Mar15   0:01 crond
---------------------------------
I remain mystified ...

-- 
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