Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is my Cron daemon running? 1

Status
Not open for further replies.

ethertec

MIS
Jun 14, 2000
6
US
Please help a linux newbie! How can I tell if my crond daemon is currently running? I'm trying to run a cron job but it never seems to execute.

Thanks,
Ethertec
 
ps -ef | grep cron Ian

"IF" is not a word it's a way of life
 
You could run top as well to see what is going on.
Check your logs to see (/var/log/messages) to see what is
going on with your job if anything.

bye.
 


try

/etc/rc.d/init.d/cron status

and see what that tells you
 
IPconfig,

When I do a "crond status" (since "cron status" is not a recognized command) from /etc/rc.d/init.d, I get the following error:

crond: can't lock /var/run/crond.pid, otherpid may be 390: Resource temporarily unavailable.

I tried using top and checking the /var/log/messages per the suggestion above, but they don't tell me much. If by chance cron is not running, how hard is it to start it back up? Please keep in mind that I'm running Red Hat Linux 5.0.

Thanks!
ethertec
 
IF cron is not running (ps -ef | grep cron)

then run /etc/rc.d/init.d/crond start

OR

run /etc/rc.d/init.d/crond restart

if you are really in doubt
then run /etc/rc.d/init.d/crond stop
and /etc/rc.d/init.d/crond start

Have fun
:)
 
>>crond: can't lock /var/run/crond.pid, otherpid may be
>>390: Resource temporarily unavailable

Hmm... ok, it looks like the PID file exists,

Do a

ps -ef|grep crond

then do

cat /var/run/crond.pid

see if they are the same #'s

If not, kill -9 <PIDs of running crond >
then, rm /var/run/crond.pid


That should get everything stopped so you can /etc/init.d/crond start
:)

-John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top