Page 1 of 1

crontab for services

Posted: Mon Sep 13, 2004 8:28 pm
by pete212
I have a serviceschk already and it works because i ./serviceschk 'd it and it worked but i am having trouble with the .cron file i tried

0,01,02,03,04,05 * * * * /www0/chatnet/auspices/serviceschk

because i want it to check for services running every minute, and it doesnt work. anyone know what i did wrong?

Posted: Mon Sep 13, 2004 10:59 pm
by WilliamWIkked
did you chmod the file?, and edit the file? (if nescessary)

Posted: Mon Sep 13, 2004 11:32 pm
by pete212
yes sir

Posted: Tue Sep 14, 2004 4:13 am
by codemastr
Well first off, that won't check every minute, that will check on minute 0, 1, 2, 3, 4, and 5 of each hour. That leaves minutes 6-59 unchecked. You want to use an *. Whoever told you that 0,1,2,3,4,5 was the proper way to check every minute didn't know what he was talking about.

Secondly, did you actually install the cron job? Simply creating the file isn't enough, you must actually tell crontab to load it.

Posted: Tue Sep 14, 2004 8:08 pm
by pete212
of course i installed it lol :p -- would :

*/1 * * * * /www0/ianet/auspices/serviceschk

work?

Posted: Wed Sep 15, 2004 11:23 am
by AngryWolf
I think yes. This is the kind of question that many people usually answer with "try it and see the result". :) Well, the serviceschk script does what it should (as you said, manually running works fine), so I don't think there would be any problems. Yet it's always good to double-check whether your crontab configuration is loaded right by running the command "crontab -l".