Making awstats run more often



I have awstats set to update at 3am server time (as it is in the wiki setup guide), and discovered that the stats had not changed from yesterdays. I ran the code manually (copied it from the cron job) and halfway through it terminated with a simple “Killed” text. Re-running the code resulted in it working, with it quickly going through the first few steps much quicker then it had the first time I ran it. Yesterday I experienced a massive amount of traffic, and am assuming that it was causing the stats to be calculated longer than usual and for some reason the server terminated the process. If this is correct, I’m hoping that if I ran the awstats scripts more often, say every couple of hours, it will have less to work though each time so hopefully won’t be terminated.

Unfortunately, I’m not sure how to do this. The wiki seems to allude that the logfile locations would need to be changed, but I’m not exactly sure how and after reading a bit of the awstats docs I’m still confused.


It sounds like you followed the instructions in the wiki in which case you set up a crontab to execute the awstats script at 3 AM everyday. So all you have to do is modify the crontab. The values in your crontab currently read:

0 3 * * *

That means the script will be executed at minute 0, hour 3 of every day. In other words, 3 AM everyday. You could run the script every hour by using the values:

0 * * * *

If you wanted to run it every 2 hours, you’d have to enter:

0 */2 * * *

You can read up on the crontab here: