Quote:
Originally posted by herc
Hmm, I want to run pisg once in four hours and a tcl script once every 10 min, so are these right?
* 4 * * * /dir/pisg
10 * * * * /dir/something.tcl
And is it enough to crontab file.txt which has those included?
|
If you want to run psig every 4 hours (on the hour) then it should look like this:
0 0-23/4 * * * /dir/psig
OR:
0 0,4,8,12,16,20 * * * /dir/psig
What you have says run every minute during the 4 AM hour.
Format is:
[MIN] [HOUR] [DAY OF MONTH] [DAY OF MONTH] [DAY OF WEEK] COMMAND
Looks like you tcl is running 10 minutes after every hour of every day. Should be:
0-59/6 * * * * /dir/something.tcl
OR:
0,10,20,30,40,50 * * * * /dir/something.tcl
You get your crontab file by running crontab -e
That will open vi and you enter your commands, one per line. So in your case:
#Always a good idea to comment for future troubleshooting
0 0-23/4 * * * /dir/psig
#More comments...
0-59/6 * * * * /dir/something.tcl
Hope that helps!