Hey all…
I’ve been in the process of setting up AWStats on my account, and everything has gone fine except for the last step - setting up a cron job to run the reports automatically. This seems to be beyond my abilities to get right.
Here’s what I did. First, I followed the instructions in the excellent “Newbie’s desperate cry” thread (thanks Skybly!). This got everything bootstrapped nicely, with AWStats living in my ~/awstats directory, and a data directory set up in the first domain I configured for stats (jasonlefkowitz.net) called “mystats” into which AWStats would dump the report files.
I then added this line to my crontab:
5 3 * * * perl /home/<myusername>/awstats/tools/awstats_buildstaticpages.pl -config=jasonlefkowitz.net -update -awstatsprog=/home/<myusername>/awstats/awstats.pl -dir=/home/<myusername>/jasonlefkowitz.net/mystats/
… which should run AWStats at 3:05 AM every day on the jasonlefkowitz.net logs, and drop the results into that mystats/ directory. If I run this command from the prompt, rather than from cron, that is in fact exactly what happens.
But if I leave it to cron to execute, nothing seems to happen – the reports don’t get updated. The weird part is, I don’t get any e-mail warning me of a cron error, either, which I would normally get if there was a syntax error somewhere in the crontab (or something else really wrong, like a required module not being present/found in @INC/etc.). It just seems to “fail” silently.
I checked the permissions on the .pl files in the awstats/ and awstats/tools/ directories, and they’re all good to execute (like I said, they run fine from the prompt). So it doesn’t seem to be that either.
Can anyone give me any ideas on where to look next? I know there must be a way to make this work, but I am sure running out of ideas on how to find it.
Thanks!
– Jason Lefkowitz