Hi, could you please advise what I am missing? I would like to have the time as follow: run every month from day 3 till day 10 but only during working days from Monday till Friday at time 10 and 15. I set up Cron Expression as follow:
0 0 10,15 3-10 * 2-6
Thank you for your advice.
Thank you but this I think it will run during Saturday and Sunday which I wanted to avoid and run it only from Monday till Friday.
Yeah, but we can expect the below error
It’s either way supporting to day of week or day of month
Thanks
At work we use this formatter for Cron:
Here it also states that day of week or day of month are mutually exclusive:
The way to solve this requires some modification of your workflow.
You start/schedule the job for the specific days of the months only. During startup of the job you validate the day of the week to not execute anything important during the weekend. (Or the other way around, whichver is most relevant for your architecture.
Thank you for your replies
Hey @jarous
Take a look here
In Summary, you need to use a “Non-working days” calendar COMBINED with a cron expression.
Cron Expression:
0 0 10,15 3,4,5,6,7,8,9,10 * ? *
Description of cron:
At 10:00 AM and 03:00 PM, on day 3, 4, 5, 6, 7, 8, 9, and 10 of the month
Non-Working Days Calendar
Then just create the calendar to exclude all Saturday and Sundays.
Let me know if have any further questions. Happy to help where I can
Cheers
Steve
Hey, that is perfect thank you so much
Great I could help
Please “mark as solution” if you are happy.
Cheers
Steve
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.