In order automatically update AWStats, you will need to create a cron job.
$ crontab -e
VIM opens up. Hit "i" and enter the following line:
15 4 * * * perl $HOME/awstats/cgi-bin/awstats.pl -config=yourself -update
This cron job will update AWStats at 4.15am on a daily basis. "-config="yourself"" refers to your config file (for your dog add another cronjob).
Make sure there is a trailing empty line at the end of your crontab file (after your last command-line). Then hit "[Escape]" to leave the editing mode and type "
" to save the file and close VIM.
cron job for many config files
If you have many config files, adding lots of cron jobs may not be very comfortable. In that case you might want to make use of "awstats_updateall.pl", a tool that comes with AWStats, by choosing this alternative cron job (without linebreaks):
15 4 * * * perl $HOME/awstats/tools/awstats_updateall.pl now -awstatsprog=$HOME/awstats/cgi-bin/awstats.pl -configdir=$HOME/awstats/cgi-bin/
Using "awstats_updateall.pl" will call "awstats.pl" and run an update for all config-files to be found in the specified directory (awstats/cgi-bin). Since in this case "awstats.pl" is being executed you need to make sure that permissions are set accordingly:
$ chmod 504 awstats/cgi-bin/awstats.pl
This will allow yourself and thus your cronjob to execute "awstats.pl".
It can be viewed at this URL(domain.com is your actual site):
http://www.mydomain.com/awstats/awstats.pl?config=domain.com








March 6th, 2010 at 8:04 AM
You could also use a free online cron replacement like cronless.com to call the config scripts whenever you want.
March 6th, 2010 at 10:16 AM
That’s cool.
March 6th, 2010 at 10:25 AM
I need some advice for my blog….I like your layout. Can you help me? 5 6 2
April 17th, 2010 at 4:48 PM
I love it!
July 14th, 2010 at 3:51 AM
Im not heading to say what every person else has already stated, but I do wish to comment in your knowledge with the subject. Youre truly well-informed. I cant believe how significantly of this I just wasnt mindful of. Thank you for bringing more info to this subject for me. Im absolutely grateful and definitely impressed.
July 17th, 2010 at 4:56 PM
Hey admin, very informative blog post! Pleasee continue this awesome work..