Crontab Not Working?

Crontab Not Working?

Posted by: theRascalKing
Posted on: 2006-03-05 13:08:00

I recently installed Awstats and set up the crontab as such:

0 3 * * * perl /home/<myName>/awstats/tools/awstats_buildstaticpages.pl -config=heavymetalmeltdown.com -update
-awstatsprog=/home/<myName>/awstats/cgi-bin/awstats.pl -dir=/home/<myName>/heavymetalmeltdown.com/statistics/

(Obviously I replaced my login name with <myName>)

If I am reading the crontab correctly it should run every day at 3am. Problem is it isn't. I am sure the command works because I when I run it manually it works and updates awstats.

According to the wiki the crontab is a daemon called crond. When I run:
ps -ef | grep crond
I don't see anything. Shouldn't I see it running?

Any help would be most appreciated.

Use a full path

Posted by: sdayman
Posted on: 2006-03-05 17:30:00

I use cron for awstats, and it's at least working on garth.

Try /usr/bin/perl instead of just plain perl.

-Scott

Re: Crontab Not Working?

Posted by: ardco
Posted on: 2006-03-05 23:24:00

> According to the wiki

where it says, "...what you read here could be incomplete, incorrect, ...", as this example appears to illustrate.

> the crontab is a daemon called crond.

That appears to be bum dope, applicable to generic unix, provided to you from Simon (says):

"20:01, 8 Apr 2005 Scjessey (Added crontab page (info from Wikipedia))"

From a more authoritative source, the actual debian server, man crontab:

"crontab is the program used to install, deinstall or list the tables used to drive the cron(8) daemon ..."

From ps -ef | grep cron:

... /usr/sbin/cron


Have you looked at crontab -l ? You might have the old, long-line wrap-around problem, which could be truncating your long command.

Another suggestion: you can temporarily increase the frequency for testing purposes, so you won't have to wait a day each time to see if it works.

If you're not getting error messages emailed to you from cron, you could add the following into your crontab file:

MAILTO=you@example.com

Good luck,

BobS

Tags: crontabawstatsperl