Crontab expression for a 8 and a half hour range

Issue

Crontab to run a job every minute from 11pm to 7:30am

I have this so far which is every minute from 11pm to 7:00am
the problem is the half hour.

* 23,0-7 * * *

You can play around with it here crontab_guru
Any ideas?

Solution

@Dunski : I have checked in many ways this *,0-30 23,0-7 * * * expression could stop at 07:59 min only but not yet 07:30 am.

As @jordanm suggested we have only a way to run two jobs from :

11 pm to 7 am expression * 23,0-7 * * * (“At every minute past hour 23 and every hour from 0 through 7.”) and then

7 am to 7:30 am 0-30 7 * * * (“At every minute from 0 through 30 past hour 7.”).

Answered By – Hemanth Kumar

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published