[SATLUG] Mysterious cron problem

Bruce Dubbs bruce.dubbs at gmail.com
Wed May 16 10:42:30 CDT 2007


Sean Carolan wrote:
> I have a simple script running as a cronjob on a desktop workstation.
> The workstation has Ubuntu 7.04 with the standard version of cron.
> Here's how the crontab entry looks:
> 
> */5 * * * * /usr/local/bin/myscript
> 
> That worked fine and dandy.  However when I try to run the exact same
> script on my laptop the cronjob does not execute at all.
> 
> I can run the script from the command line on the laptop and it works
> great.  I can also run any cron jobs as root.  But as soon as I try to
> add even a simple entry to my regular user's crontab file, such as
> this:
> 
> * * * * *  echo "Hello world"
> 
> I get nothing.  I've tried to turn on logging and watch the logs for
> anything suspicious but nothing shows up there.  It's like cron just
> completely ignores my user's crontab file altogether.  I don't have
> /etc/cron.d/cron.allow or cron.deny files either.
> 
> Any ideas?  I'm stumped.

I don't believe cron knows where stdout is.  It will try to email to the
user, but if that's not set up, the output will be lost.

Try `echo "Hello world" >> /tmp/hello` and see if it works.

  -- Bruce



More information about the SATLUG mailing list