Koozali.org: home of the SME Server

how to create a cron job to be run every 10 minuts... ??

Sonny

how to create a cron job to be run every 10 minuts... ??
« on: March 22, 2003, 01:26:00 AM »
i want to create a cron job to be run every 10 minuts....

the script it shoud run is  :
/home/e-smith/files/ibay/awstats/cgi-bin/awstats.pl -config=mydomain.tld -update

Is it posibil to put more than 1 job in a cron file/job
eg. if i want to run both
/home/e-smith/files/ibay/awstats/cgi-bin/awstats.pl -config=mydomain.tld -update
/home/e-smith/files/ibay/awstats/cgi-bin/awstats.pl -config=mydomain-2.tld -update

is this posibil to put in same file...

Where can i read about cron and how it works ???

Sonny

Re: how to create a cron job to be run every 10 minuts... ??
« Reply #1 on: March 22, 2003, 01:35:04 AM »
and most importen of all... where to put the cron file, and do i need to actiwate somthing to get it running, or are the location checked every x minut ?

Des Dougan

Re: how to create a cron job to be run every 10 minuts... ??
« Reply #2 on: March 22, 2003, 05:22:09 AM »
1. man cron

2. Look in /etc/cron.d for examples of how cron runs (and remember that /etc/cron.d is templated).


Des Dougan

Sonny

Re: how to create a cron job to be run every 10 minuts... ??
« Reply #3 on: March 22, 2003, 11:54:48 PM »
okay!

I have now figurared out how to write the "cron" file..
Here are the text in the file
59 * * * *  /home/e-smith/files/ibays/awstats/cgi-bin/awstats.pl -config=domain.tld -update

I have saved the file in the template dir with the file name statupdate
and then ran the comand "crontab statupdate"

And when the script is ran by the cron daemon, i get this mail :
Error: Couldn't open config file "awstats.domain.tld.conf" nor "awstats.conf" : No such file or directory Setup (Config file, web server or permissions) may be wrong. See AWStats documentation in 'docs' directory for informations on how to setup awstats.

I have the awstats.domain.tld.conf file in the same dir. as the awstats.pl file, so what do i need to change permision to... a user the dir where it are stored, or what ???