Hi,Sorry I cant seem to locate this topic and decided to post it here. I would like to enquire the following. Maybe anybody could provide me an advice please.? Appreciate it. TQVM
How to set alternate minute e.g every 5 minutes and stop at certain half an hour e.g. 16:30pm in between 9.00am to 4.30pm Monday to Friday please?
Cron Expressions cannot have range limits in Minutes, hence we cannot have 1 cron expression for your requirement. That said you can split it up into two schedules as follows:
Schedule 1: Every 5 min 9am to 4pm : 0 5 9-16 ? * MON,TUE,WED,THU,FRI *
Schedule 2: Every 5 min from 4 pm to 4:30 om: 0 5,10,15,20,25,30 16-17 ? * MON,TUE,WED,THU,FRI *
As @Nithin_P mentioned, you would have to use two different cron expressions in order to facilitate the half hour; However, you can simplify the expression by dividing your minutes to create increments (i.e. */5)