Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i want a service to be start at 8:00 and be ended in 14:00 automatically

i already do this manualy by:

/etc/init.d/myservice.sh start


/etc/init.d/myservice.sh stop

i think it should be related to cron jobs. any idea?

share|improve this question

migrated from stackoverflow.com Mar 2 '10 at 22:52

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

up vote 7 down vote accepted
minutes | hour | day | month | day of week | username | command
0         8      *     *       *             myuser    /etc/init.d/myservice.sh start
0         14     *     *       *             myuser    /etc/init.d/myservice.sh stop

Replace myuser with whatever is appropriate. (probably root)

Also, belongs on serverfault or superuser

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.