Prev: NYC LOCAL: Friday-Sunday 16-18 July 2010 The Eighth Hackers on Planet Earth Gathering
Next: netbook as fax machine
From: Lew Pitcher on 15 Jul 2010 17:14 On July 14, 2010 03:37, in comp.os.linux.misc, john(a)example.com wrote: > > Hi, > > I've been having odd problems with cron.daily jobs not being run now and > then, but now it has not run for the last few days. > > cron.log shows it has run... > > Jul 13 06:25:01 xxxxx /USR/SBIN/CRON[18892]: (root) CMD (test -x /usr/ > sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )) > > > But I get none of the emails that it should send. > It works if I manually run: > > test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/ > cron.daily ) > > Any ideas where to look for a solution ? What is root's MAILTO set to? Have you read root's mail? What is the cron job's stdout set to? -- Lew Pitcher Master Codewright & JOAT-in-training | Registered Linux User #112576 Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/ ---------- Slackware - Because I know what I'm doing. ------
From: J G Miller on 15 Jul 2010 17:28 On Thu, 15 Jul 2010 20:53:56 +0000, JohnT wrote: > Because, as I said in my original post, I can run the script manually > and it works. So it is all down to the difference in ENVIRONMENT between when the script is run as CRON and when the script is run at the user shell interface.
From: Aragorn on 16 Jul 2010 08:27 On Thursday 15 July 2010 23:28 in comp.os.linux.misc, somebody identifying as J G Miller wrote... > On Thu, 15 Jul 2010 20:53:56 +0000, JohnT wrote: > >> Because, as I said in my original post, I can run the script manually >> and it works. > > So it is all down to the difference in ENVIRONMENT between when the > script is run as CRON and when the script is run at the user shell > interface. And that *is* what I told him in my own reply. He did not specify the path to the executable "run-parts", which resides in "/usr/bin" on my system, and cron runs Bash (or whatever the default shell is) in non-interactive mode, in which case his environment definition - including the value of $PATH - will not get sourced and a minimal environment is used. -- *Aragorn* (registered GNU/Linux user #223157)
From: J G Miller on 16 Jul 2010 11:17 On Fri, 16 Jul 2010 14:27:39 +0200, Aragorn wrote: > cron runs Bash (or whatever the default shell is) On legacy systems ie Unix it will be Bourne Shell, and increasingly on Linux systems it will be Dash. So cron script writers should avoid using bashisms in their scripts.
From: JohnT on 16 Jul 2010 16:58 On Thu, 15 Jul 2010 17:14:50 -0400, Lew Pitcher wrote: > > What is root's MAILTO set to? me > Have you read root's mail? yes, checked just in case, but nothing there -as it gets redirected to me too > What is the cron job's stdout set to? I have MAILTO set to me, so it should go there. JohnT
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: NYC LOCAL: Friday-Sunday 16-18 July 2010 The Eighth Hackers on Planet Earth Gathering Next: netbook as fax machine |