Web Hosting Talk







View Full Version : CRONTAB setup


cyrusTvirus
02-14-2002, 06:50 PM
Hi,

I want to run a script every 5 minutes every day.
I created the following entry in the crontab

0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /home/sites/www.XXXX.com/web/netstatus/cron_script
(this is infact one line in the tab)

What am I doing wrong here cause now the script isn't ran somehow. This is how I understand the way to create it searching google.

Feedback very welcome !

Robbert
Ps. Posted it by accident also in Cobalt Servers

zupanm
02-14-2002, 08:01 PM
If this is a linux box you can do it this way

*/5 * * * * /home/sites/www.XXXX.com/web/netstatus/cron_script


the part after the 5 time entries is the command you want to run as that user you entered the crontab for. So you cannot run

root /home/sites/www.XXXX.com/web/netstatus/cron_script

it'll probably complain root command not found. make sure its all one line and you should be good. If you can run /home/sites/www.XXXX.com/web/netstatus/cron_script as the user you enter the crontab as you should be ok.