LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-16-2011, 02:37 AM   #1
Prabagaran
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Rep: Reputation: Disabled
Question Crond dies often and enters into dead state


Hi,

I have set cron on my Fedora 8-64 bit, which was running without any issues, till a couple of months ago.

Suddenly, it started to enter into dead state often (say once in a week, somtimes once in two weeks).

I have to manually restart the crond daemon to start the cron jobs.

Would be pleased if some-one guides me in right way to troubleshoot and resolve this issue, permanently ?

Regards,
PL
 
Old 05-16-2011, 07:21 AM   #2
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Lightbulb

Hi Prabagaran,

If I was in your place, I would have used the below script and run it as a daemon as root user.

You can follow the below steps.

Code:
vim /root/cron.sh
while true
do
pgrep crond &>/dev/null
if [ $? -ne 0 ]
then
service crond start
fi
sleep 30
done

chmod 700 /root/cron.sh

nohup bash /root/cron.sh &
Also, to make it last across reboots append the below line in /etc/rc.local
Code:
nohup bash /root/cron.sh &
This script will check for the cron service (crond daemon) after every 30 seconds and if the service is not running, it will start the cron service.

Hope this helps.
 
Old 05-17-2011, 04:02 AM   #3
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
I wonder why it died. Anything in the logfiles in /var/log?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: State of E-Mail Authentication: SPF Dead, Others on Life Support LXer Syndicated Linux News 0 04-20-2006 07:33 AM
x server dies...dies...dead! aquaboot Linux - Software 2 08-28-2005 11:54 AM
Crond Dead But Subsys Locked, cannot restart cron services jmm8142 Linux - Software 4 05-23-2005 12:41 PM
crond dead but subsys locked dpirvulescu Linux - Software 9 04-23-2005 09:09 AM
crond dead but pid file exists ryedunn Linux - General 0 01-27-2005 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration