Operating System - HP-UX
1821546 Members
2065 Online
109633 Solutions
New Discussion юеВ

Re: multiple cron processes

 
SOLVED
Go to solution
Tim Nelson
Honored Contributor

multiple cron processes

Anyone ever seen multiple cron daemon processes running on a system ? I was investigating an issue with a cron job running or not running. Happened to notice after collecting ps -e|grep cron over the course of 24 hours that occasionally there is more than one cron running. The others PPID is the origional (pid 1547). Just curious if this is normal albeit not consistant ( 4 times over the last 24 hours) and if normal why ?

Wed Apr 6 23:00:00 CDT 2005
1547 ? 1:43 cron
11681 ? 0:00 cron
11679 ? 0:00 cron
11680 ? 0:00 cron
11686 ? 0:00 cron
11677 ? 0:00 cron
Wed Apr 6 23:01:01 CDT 2005
1547 ? 1:44 cron
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: multiple cron processes

This might occurr when a job that has been scheduled through cron is running.

Check your crontab files and see if there are jobs that are scheduled around the time you see the multiple cron processes.
Tim Nelson
Honored Contributor

Re: multiple cron processes

Yes there are jobs running at that time. There are also jobs running or are started at other times but multiple "cron" daemons do not run.
So this could be part of the normal operation of cron. My question would still be why is it not consistant ? What would be the reasons for sometime yes sometime no ?
Alberto Ochoa
Advisor

Re: multiple cron processes

It may not be normal. Generally the cron should start with the startup script /sbin/init.d/cron at system startup. If I do a ps -fe |grep cron I can see only 1 cron process running (note that you have collected the info over the course of 24 hours, which I have not at this time) however, if I try to start another cron process (/sbin/init.d/cron start) I receive this message: ! cron is already running Thu Apr 7 16:27:54 PDT 2005
! ******* CRON ABORTED ******** Thu Apr 7 16:27:54 PDT 2005. So I am not able to start another cron daemon. Perhaps it could be patch related.
Learn-Share-Help, in any order.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: multiple cron processes

I suspect that you will find that each of these crons has at least 1 child process that
has failed to terminate. Cron has to fork() to execute the processes. Look for child processes that have a parent PID equal to those cron PID's.


Look for the latest cron cumulative patch appropriate to your OS but I don't think that is going to help. You have processes spawned by cron that failed to terminate and each of these crons is doing a wait().

If it ain't broke, I can fix that.
Tim Nelson
Honored Contributor

Re: multiple cron processes

Thanks guys. I will modify my monitory to look for any children of these cron processes. I will update this once I get a hit.

Gracias !!
Tim