Another awstats cron q



Nothing I do from all the reading I’ve done on the forums and wiki seems to get my cron for awstats working…

14 * * * * /usr/local/bin/perl /home/seventyp/ -update >/dev/null

can anyone spot the problem?

I installed awstats from this: which was very helpfull, but the cron didn’t have the /usr/local/bin/perl/ in it, I found that on the forum somewhere.

Thanks in advance for any help.


OK! I dumped that way of doing it, cause I couldnt’ get the cron to work.

I went back to this method:
and got it all to work. Even though that method is imperfect. I highly recommend anyone trying to set this up to read the talk page for that wiki.

I also highly recommend anyone doing a cron to check it in the shell first. The shell will give you errors the cron won’t unless you have it set to email you. I know this sounds obvious, but some of us are just learning this stuff.

My question now is, will running this cron once an hour have any ill effects? Will it ruin my logs, slow my server, cause undo load ect?

I’m really vain about my stats. :smiley:



[quote]14 * * * * /usr/local/bin/perl /home/seventyp/ -update >/dev/null

can anyone spot the problem?[/quote]
The problem is that you’re explicitly telling the script to pipe it’s output to the garbage heap by using “>/dev/null”. I realize that the wiki article you quoted uses this exact syntax, and most likely your cron job is actually running. It’s just discarding the output as you requested of it. I had a little difficulty getting my jobs to run, and identified a few items that may be of use.

  1. Sometimes my jobs would be terminated right after starting them in the SSH terminal window. Using the “nice” command made this stop
  2. I needed to make sure the entire command was on one line. Turning off autowrap helped me here. Do this in the crontab editor by pressing “alt-W”
  3. I made sure to pad my job runtimes to two digits, but this isn’t relevent in your situation
  4. I entered a blank line after the command, then saved.

Here’s an example of my functioning script that dumps the output where I expect it to be. You can check the impact of running your script hourly by logging into “”. Keep in mind this has to be on one line in the crontab editor. It’ll probably wrap here.

01 03 * * * nice -20 /usr/local/bin/perl /home/username/awstats/tools/ -update -awstatsprog=/home/username/awstats/cgi-bin/ -dir=/home/username/

BC Tech
Team Shocker