Can somebody please help me with the cron job for second last weekday of every month.
welcome to community.
At first check this web site:
And the result can be:
**Resulting Cron Expression**: 0 0 0 L-2 * ? *
Hey, thanks for the quick help… but I need the second last Working day of the month… This will include weekends also right.I want only the weekdays
The working day depends on your country calendar, CRON doesn’t know it.
You can make your calendar and import it to the Orchestrator.
okay got it. What about second last Weekday of every month
It is not your answer?
this will provide me the second last day of the month but it may not be a weekday
For example, in Feb 2021 the second last working day was 27(Saturday) which will be equal to value of the cron you have provided… but I want it on the weekday i.e., 26th (Friday)
Nearest weekday (Monday to Friday) will be suitable, but only on the condition that there is no holiday then.
Resulting Cron Expression: 0 0 0 31W * ? *