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/awstats.pl -config=cwp-dev-02

If I run:

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

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

2 Answers 2


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


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

00 09 * * * root /usr/local/awstats/cgi-bin/awstats.pl -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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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