Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to set a cronjob to execute after every 10 minutes from morning 1000 hours to evening 1730 hours. Is it possible to set this in the crontab file ?


share|improve this question
Questions like this make me wish there was an option to close question because the OP has put in absolutely no effort to help themselves. – John Gardeniers Mar 16 '11 at 6:52

You would need multiple entries for the job:

0,10.20,30,40,50 10-16 * * * myjob
0,10,20          17    * * * myjob

(Add ",30" to the second line if you want the end time to be inclusive.)

share|improve this answer
I have done that already. Is it possible to achieve this having a single cronjob entry ? – Iliyas Shirol Mar 16 '11 at 5:17
No; there have been several attempts to replace cron with something more flexible, but none ever caught on (the existing cron replacements all use the same time specification syntax). – geekosaur Mar 16 '11 at 5:19
If the OP really really wants one cronjob entry, he could add a check in his job to see if the time was in the correct range, and skip execution if not. – Phil Hollenback Mar 16 '11 at 5:22

Your Answer


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.