LinHES Forums
http://forums.linhes.org/

R5F27 cron not running?
http://forums.linhes.org/viewtopic.php?f=17&t=16723
Page 1 of 2

Author:  jac1d [ Tue Sep 25, 2007 5:38 am ]
Post subject:  R5F27 cron not running?

I've noticed that my entries in /etc/cron.daily/ appear not to be running, and I saw at least one other post on the forums indicating observations that cron appears to either not be running or behaving erratically.

Is there a problem with cron in the latest version or anything I need to run after updating /etc/cron.daily/script.sh entries?

-J

Author:  mac [ Tue Sep 25, 2007 8:06 am ]
Post subject: 

run the script from the command line make sure it works ie.

/etc/cron.daily/script.sh

If it does not run try:

chmod 755 /etc/cron.daily/script.sh

Author:  jac1d [ Tue Sep 25, 2007 8:15 am ]
Post subject: 

Thanks for the suggestions, I actually should have mentioned that I'd already done both of those before I posted.

The script runs fine and the permissions are already 755.

-J

Author:  spideyk21 [ Tue Sep 25, 2007 9:46 am ]
Post subject: 

I noticed the same problem(s) a few days ago. Still no solution, yet I have not tried the chmod 755 yet.

Author:  slowtolearn [ Tue Sep 25, 2007 10:00 am ]
Post subject: 

Is the cron daemon running? ps -ef | grep cron

Author:  jac1d [ Tue Sep 25, 2007 10:54 am ]
Post subject: 

I really need to work on providing details.

Yes, I had checked, cron (as a process) is running.

-J

Author:  spideyk21 [ Tue Sep 25, 2007 11:00 am ]
Post subject: 

Not to steal jac1d tread but here is my ps -ef | grep cron

Code:
root     5428     1    0     Sep24  ?       00:00:00  /usr/sbin/cron
mythtv   6661  6659    0     13:02  ttyp1   00:00:00  grep cron

Author:  tscholl [ Tue Sep 25, 2007 11:16 am ]
Post subject: 

I'm not close to my myth box but after my install I looked for a cron listing for both the myth and root users. Nothing was returned. I'm not sure what user knoppmyth cron is set to run.

I couldn't find a cron listing for any user.

Tim

Author:  slowtolearn [ Tue Sep 25, 2007 1:31 pm ]
Post subject: 

I just fired up an auto-install of R5F27 on my test system and cron seems to be working as expected. What is the contents of your /etc/crontab file? And there is no mention of cron in your /var/log/syslog?

Author:  spideyk21 [ Tue Sep 25, 2007 6:08 pm ]
Post subject: 

Here is my crontab.
Code:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root            cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report  /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report  /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report  /etc/cron.monthly )
#

# RRD Tool
*/5 * * * *     root    test -x /usr/local/bin/run_rrd && /usr/local/bin/run_rrd

Author:  spideyk21 [ Wed Sep 26, 2007 6:40 am ]
Post subject: 

Fixed my problem. I had added a scheduled mythback cron job which apparently was the Error in the crontab. Corrected the cron line and now everything seems to be working fine.

I will watch it for the next few days to double check.

Author:  alien [ Wed Sep 26, 2007 7:21 am ]
Post subject:  Re: R5F27 cron not running?

jac1d wrote:
Is there a problem with cron in the latest version or anything I need to run after updating /etc/cron.daily/script.sh entries?

Check "man anacron". There are certain characters that cannot be used in the file name. I believe "." is one of them.

Also note that (at least in F1 and earlier versions) if the script produces any output, cron aborts as there is no mail daemon to send the output. The fix for that is to remove/redirect the output from the script or add MAILTO="" to the /etc/crontab file.

Author:  jac1d [ Wed Sep 26, 2007 5:53 pm ]
Post subject: 

I changed my filename so there is no "-" dash in it, in case that was the problem.

I also added the MAILTO="" to /etc/crontab

I'll check in the AM and see if it runs properly.

Thanks for the suggestions...

-J

Author:  Kirk [ Wed Sep 26, 2007 7:13 pm ]
Post subject: 

Also note for future readers that cron.daily, weekly and monthly jobs are run at 6:25am, 6:47am and 6:52am respectively (refer /etc/crontab). If your box isn't awake at that these times then the cron jobs won't be run. You can either change these times to something more suitable or install anacron which will run them if they haven't been run.

Author:  marc.aronson [ Mon Sep 29, 2008 9:27 pm ]
Post subject: 

I'm using anacron and it appears to work. I do have 2 questions trigger by seeing the following output:
Code:
      Anacron 2.3 started on 2008-09-29
      Will run job `cron.daily' in 0 min.
      Job `cron.daily' started
      Job `cron.daily' terminated (exit status: 1) (mailing output)
      anacron: Can't find sendmail at /usr/sbin/sendmail, not mailing output
      Normal exit (1 job run)
      Checking against 1 with 31


1. The inability to find sendmail makes sense since it isn't installed. Is there a way I can configure anacron to place the output into a log file rather than email'ing it?

2. Does the presence of an error prevent some of the daily jobs from being run?

Thanks!

Marc

Page 1 of 2 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/