View Full Version : end service started by cron
hobey19
06-02-2007, 11:18 AM
i am rather new to this whole cron thing, but i have it set up to start up a service every morning at 1 am. i would only like that service to run until 7 am, so that when i wake up, its not running anymore. how can i limit the time that the job runs? or do i create another cron job to end the service?
thanks in advance
craig
kilgoretrout
06-06-2007, 06:20 PM
I think you answered your own question. The easiest thing to me would be creating another cron job to shut down the service at a given time each day.
hobey19
06-06-2007, 10:19 PM
alright, i did that. i am running ClarkConnect, and using webmin, i created the cron job, although its part of the Cluster Services section. i don't have a cluster, but i can just set the job for one server, which i did. i set the job to start at 1am and i set another to kill it at 7am. in webmin, it gives you the ability to click Run Now to test it, and both the starting and stopping works perfectly.
however the job did not run last night like it was supposed to. i confirmed this morning by manually clicking Run Now, and it worked just fine. i am going to see if it runs tonight, but hopefully you can offer some insight
thanks
craig
mairving
06-07-2007, 09:26 AM
Looking in the cron logs can be helpful in troubleshooting.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.