Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to schedule a perl script to run daily, but I am not sure if I am doing everything right.

The script I want to run is to update AWStats each day, without manually having to press update.

Currently, I created a file in the cron.d folder with the following text inside:

00 09 * * * /usr/local/awstats/cgi-bin/ -config=cwp-dev-02

If I run:

/usr/local/awstats/cgi-bin/ -config=cwp-dev-02

The stats update succesfully, but nothing seems to happen with the scheduled task...

share|improve this question
up vote 1 down vote accepted

Don't copy such files directly into cron.d - instead use the crontab(1) command to inject new commands.

Suppose your entries are in a file named mycrontab:

 $ crontab mycrontab

and you're done

share|improve this answer
This worked perfectly! Thank you very much! – boburob Oct 17 '11 at 11:17

I think you need to include a username in the job spec e.g.

00 09 * * * root /usr/local/awstats/cgi-bin/ -config=cwp-dev-02

because the files in /etc/cron.d are treated in the same way as the /etc/crontab file. Also check that only root can write to the file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.