Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to start cron job at 9:30 and then work every 5 minutes and then stop at 16:30 everday. Is this kind of scheduling possible in one or do I have to need two cron jobs?

share|improve this question
add comment

1 Answer 1

up vote 9 down vote accepted

I think something along the lines of:

30/5 9-16 * * *  /usr/bin/script_to_run.sh

See the wiki page for details of timing syntax. I suggest testing this with a script that logs the time it runs at to a file.

#!/bin/bash

echo "Cron ran at: " `date` >> /var/log/crontimetest.log
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.