[CentOS] cron.hourly runs twice

Timothy Murphy gayleard at eircom.net
Wed Mar 17 23:17:52 UTC 2010


Jason Pyeron wrote:

> Please send output of:
> 
> for i in  /etc/crontab  /var/spool/cron/*; do echo $i && cat $i; done

Thank you very much.
That seems indeed to be the solution.
On the first machine I have:
-------------------------------------------
[root at helen tmp]# for i in  /etc/crontab  /var/spool/cron/*; do echo $i && 
cat $i; done
/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

/var/spool/cron/root

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * run-parts /etc/cron.hourly
02 4 * * * run-parts /etc/cron.daily
22 4 * * 0 run-parts /etc/cron.weekly
42 4 1 * * run-parts /etc/cron.monthly
-------------------------------------------
On the second machine I have
-------------------------------------------
[root at althea tmp]# for i in  /etc/crontab  /var/spool/cron/*; do echo $i && 
cat $i; done
/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
/var/spool/cron/*
cat: /var/spool/cron/*: No such file or directory
-------------------------------------------

So it seems that entry at /var/spool/cron/root
is the cause of the problem.
I've no idea where it came from;
I guess I must have copied at some time -
I see the file is dated 1 March.




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