How to respawn crond when it dies
Is there a way to respawn a daemon that dies in Centos?
Ta
7 Replies
… but for good reason. Cron is usually solid as a rock, and shouldn't be dying unless there's something seriously bad going on. You probably want to figure out why it crashes and address that.
Another idea might be to write a daemon that periodically checks to ensure cron is running.
Well, where should I start looking to see why it died? cron logs show nothing…..
I have cron executing a php script every 2 minutes and i log the results to a file.
The only thing I can think of is when i logrotate this particular log file.. there may be a collision with the cron daemon if they both want access to the file at the same time.
I have no idea whether cron and logrotate can collide in this siutation.
monit
Another option might be using inittab
Might be worth checking your distribution's bug tracker, and opening a bug report if it's not a known issue. All software has bugs, and this sounds like one! -rt