Hi All,
I need my bot to run on Monday to Friday at 10 AM from 15th to 30th/31st (end date of month) on every month.
try with this
0 10 15-31 * 1-5
0
: The minute (0th minute, i.e., exactly on the hour).10
: The hour (10 AM).15-31
: The days of the month (from the 15th to the 31st).*
: Every month.1-5
: The weekdays (Monday to Friday, where 1 is Monday and 5 is Friday).
if possible can you explain this
@yashashwini2322
see the above answer
15-31
: The days of the month (from the 15th to the 31st).
what if the month end date is 30th ,so we can’t pass the exactly 31st on that case.
@yashashwini2322
In months that have fewer than 31 days (like April), cron will simply skip over any days that don’t exist.
for example let us consider April month
- The cron expression will run on April 15th at 10:00 AM if it is a weekday (Monday to Friday).
- If April 15th falls on a weekend (Saturday or Sunday), the cron will skip it. But if it’s a weekday, the bot will run.
- April 31st: April has only 30 days, so the 31st does not exist. Therefore, the cron expression will skip the 31st and will not run on that day.
- Then continues with next month (i.e May 15th)
thank you,i’ll test and update you on this
Small changes can we add seconds? in front like as below
0 0 10 15-31 * 1-5
@yashashwini2322
Yes you can add seconds if you want the bot to run at a specific time like 10:00:00 AM
Hi,it’s showing invalid cron Expression
0 10 15-31 * 1-5
@yashashwini2322
would you be able to share the error screenshot?
both days of month and day of week together in one cron is not supported
what you can do is create a calendar in orch…and mark all sunday and saturday as holiday and use below cron and select the created calendar so that it runs only after 15 of month and as calendar says sunday and saturday are holiday will skip those
10 0 10 15-31 * ? *
you can build cron on this site
This. Use a cron expression generator, copy the output string, and click “Advanced” in the Orchestrator trigger to paste the expression.