DreamHost Web Hosting
Discussion Forum


Forums
   >> General Troubleshooting
*Threaded Mode

Subject AWStats + crontab = errors  
Posted byjbarr (DH New User )
Posted on05/12/06 07:39 AM



Hi!

I'm having a problem getting crontab to "take" my command to regularly update AWStats. Here's what I did:

1. Entered the following at a command prompt:

crontab -e

2. In the editor, I entered the following text:

0 2 * * * perl /home/username/awstats/tools/awstats_buildstaticpages.pl -config=domain.com -update -awstatsprog=/home/username/awstats /cgi-bin/awstats.pl -dir=/home/username/domain.com/statistics


(note: This is all one line, my username is replaced with "username" and my domain is replaced with "domain.com". There is also a blank line after the above command line.)

3. I save the file and exit the editor, and get the following error message:

[beverly]$ crontab genstats.ctab
"genstats.ctab":0: bad minute
errors in crontab file, can't install.

4. Issuing crontab -l tells me that there is no crontab for this user.

So, I looked in the crontab page on the DH Wiki, and followed the command syntax exactly (I think) but I still get the error. I tried creating the file manually and issued a crontab filename command, and that gave the same error.

Anyone have any solution as to how to get this working?

Thanks!

-Jim




Subject Re: AWStats + crontab = errors new [re: jbarr]  
Posted byjbarr (DH New User )
Posted on05/12/06 07:43 AM



OK, I just solved the error...

The Wiki shows example crontab parameters in the following form:

0 2 * * * program

That fails.

When I enter as:

00 02 * * * program

it works.

So, make sure you use 2 digit numbers!

Hope this helps someone!

-Jim http://JimsTips.com



Subject Re: AWStats + crontab = errors new [re: jbarr]  
Posted bynorm1037 (DH Smarty Pants)
Posted on05/12/06 07:55 AM



As a test could you try it as
00 2 * * * program
to see if that works just out of interest since only the first minutes digits requires the double digit setting. Putting 02 in the hour spot is okay but I am sure it is not a requirement if you see what I mean.



--
Norm


Subject Re: AWStats + crontab = errors new [re: norm1037]  
Posted bymatttail (DH Pooh-Bah)
Posted on05/12/06 08:37 AM



I will put a note in the wiki about this, but odly enough I tested on my server (galaga) and single digit minutes and hours work just fine.



--Matttail
art.googlies.net - personal website



*Threaded Mode
Jump to