Hello, How can a job be scheduled on 2nd working day of the month?
By Working Day I mean only weekdays(MON-FRI). I am not concerned about National Holidays and stuff.
Cron Expression: 0 0 10 2W * ? *
Result: * Wed Sep 02 12:00:00 UTC 2020
- Fri Oct 02 12:00:00 UTC 2020
- Mon Nov 02 12:00:00 UTC 2020
- Wed Dec 02 12:00:00 UTC 2020
**** Fri Jan 01 12:00:00 UTC 2021*** - Tue Feb 02 12:00:00 UTC 2021
- Tue Mar 02 12:00:00 UTC 2021
- Fri Apr 02 12:00:00 UTC 2021
- Mon May 03 12:00:00 UTC 2021
- Wed Jun 02 12:00:00 UTC 2021
This gives me nearest weekday to the 2nd of the month, every month but my requirement is to get 2nd weekday basically.
Date given by above Cron Exp - Fri Jan 01 12:00:00 UTC 2021 instead Mon Jan 04 12:00:00 UTC 2021 should be given