LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-04-2012, 04:24 AM   #1
Kjanss
LQ Newbie
 
Registered: Oct 2011
Posts: 6

Rep: Reputation: Disabled
Cron stopped working but cronlog stays empty


I run CentOS 5.8 /32, I haven't done anything on the box (except regular yum updates).

Something strange is happening to me:

Since a couple of months my cron works partially. One entry in my bash script, a 'service restart' doesn't seem to be executed anymore. The cron log stays empty (0 bytes)

Is there any way to find out what happens?
 
Old 04-04-2012, 06:46 AM   #2
uniquerockrz
LQ Newbie
 
Registered: Mar 2012
Location: Kolkata, India
Distribution: Arch Linux
Posts: 17

Rep: Reputation: Disabled
have you disabled the crond deamon?
 
Old 04-04-2012, 06:52 AM   #3
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,728

Rep: Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754
If there is an error in the cron file, cron fails. In my distribution, cron error messages are disabled by default.

See this post: http://www.linuxquestions.org/questi...=cron+jlinkels

jlinkels
 
Old 04-04-2012, 09:25 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,417

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Well, assuming crond is running, normally it will email the owner of the job or root user if it has an issue.
Try the mailx cmd as each user and see what's there.
Also, /var/log/messages?
 
Old 04-05-2012, 01:17 AM   #5
Kjanss
LQ Newbie
 
Registered: Oct 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
in /etc/syslog.conf I read:
Quote:
# Log cron stuff
cron.*
/var/log/messages are empty, as well as /var/log/cron

The /etc/cron.d directory has a file called
cron_maintenance
containing
Quote:
* * * * * root /root/maintenance.sh
/root/maintenance.sh runs fine, except one line where I restart a service:
Quote:
service pdns restart
When I ssh under root, I run
Quote:
-bash-3.2# service pdns restart
without any problems

Putting the restart in a seperate cron
/etc/cron.d/cron_pdns
Quote:
0 * * * * root service pdns restart
Also doesn't seem to work

Last edited by Kjanss; 04-05-2012 at 01:20 AM.
 
  


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
Cron for root stopped working after OS update gprichardson1 Red Hat 1 03-28-2012 11:42 AM
[SOLVED] Cron for root stopped working after OS update gprichardson1 Red Hat 1 03-28-2012 11:17 AM
Cron stopped working - How do I troubleshoot? mufy AIX 1 04-11-2010 04:33 AM
cron job suddenly stopped working Gisli Linux - Software 1 08-25-2005 01:03 PM
Syslog stays empty Etraman Slackware 12 04-20-2005 08:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration