LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Have cron job start running at the half hour? (https://www.linuxquestions.org/questions/linux-server-73/have-cron-job-start-running-at-the-half-hour-867023/)

ghurty 03-07-2011 12:49 PM

Have cron job start running at the half hour?
 
I know how to set a cron job to run every five minutes starting at the beginning of the hour:
*/7 19-23 * * * /path/to/job.sh

But how would I do it starting at the half hour?

Thanks

szboardstretcher 03-07-2011 12:54 PM

Could you explain this a bit more? Do you mean, you want to run a command every 5 minutes... starting at 7:30?

ghurty 03-07-2011 12:55 PM

Quote:

Originally Posted by szboardstretcher (Post 4281777)
Could you explain this a bit more? Do you mean, you want to run a command every 5 minutes... starting at 7:30?

Yes, exactly.

Thanks

szboardstretcher 03-07-2011 12:57 PM

interesting.

well,.. I guess this would work.

Code:

30,35,40,45,50,55 19 * * * /path/to/script.sh
*/5 20-23 * * * /path/to/script.sh

Starts 7:30, 7:35 etc.. to 8:00 then every 5 from there on the next line.


All times are GMT -5. The time now is 03:33 AM.