cron not running my command?

Bill Moran wmoran at potentialtech.com
Mon Sep 20 11:33:13 PDT 2004


Bob Ababurko <ababurko at adelphia.net> wrote:
> Hey there-
> 
>    I am running FreeBSD 5.2.1  and I have a cron job running 
> webalizer.  The cron job seems to be running based on the log, but the data 
> is not being updated in the directory.  I do believe that I can say that 
> the webalizer is configured correctly because if I run the command that is 
> listed in cron by hand, the output is sent to the proper place.  Here are 
> some l0og entries and the crontab itself:
> 
> europa# crontab -l
> 0 * * * * /etc/cron.daily/ntpdate.cron > /dev/null
> */5 * * * * /usr/sbin/webstats

<snip>

> I am confused on where I should look now.  Any suggestions would be 
> appreciated.

What is the contents of /usr/sbin/webstats?

Does that script assume certain environment variables are set?  Such
as PATH?  If so, you're better off without those assumptions.

Possibly adapt /usr/sbin/webstats to output debugging info that you'll
get in your email to help diagnose what's going wrong.  If you're not
getting email from cron when things go wrong, get your email system
working properly before doing anything else.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com


More information about the freebsd-questions mailing list