[CentOS] cron.hourly runs twice

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


Jason Pyeron wrote:

>> >>> For some reason I cannot fathom,
>> >>> cron.hourly runs twice each hour
>> >>> on one of my two CentOS-5.4 systems,
> 
> Add this to the cron.hourly
> 
> #!/bin/sh
> pstree -up >> /tmp/foo.log

I tried this; the relevant lines on the first machine are:
-----------------------------------------
        |-crond(9167)-+-crond(9439)---run-parts(9441)-+-awk(9452)
        |             |                               `-foo(9450)---
pstree(9451)
        |             `-crond(9440)---run-parts(9442)-+-awk(9455)
        |                                             `-foo(9454)---
pstree(9456)
        |-cupsd(5301)---{cupsd}(17775)
-----------------------------------------
and on the other CentOS machine:
-----------------------------------------
        |-crond(2824)---crond(28255)---run-parts(28256)---foo(28257)---
pstree(28258)
-----------------------------------------

I've checked that /etc/rc.d/init.d/crond on the two machines
are the same.
So too is /etc/sysconfig/crond .

I'm not clear why crond starts another copy of crond,
even on the second machine?


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