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.

Is there a way to specify a job that runs every 5 minutes between some start time and some end time on business days in a crontab?

Update I think it's relevant that my start and end times are not at round hours. So, specifying 9-5 in the hour column isn't enough. I want 9:30-17:30.

share|improve this question
add comment

1 Answer 1

up vote 14 down vote accepted

You'll have to do it piecewise:

30-59/5 9 * * * script.sh
*/5 10-16 * * * script.sh
0-30/5 17 * * * script.sh
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.