I need some advise. I have a job which is running everyday and I'm looking to have a particular task to run on the second working day of the month. I know I can solve this by setting up another job and use a cron pattern (0 0 0 2W ? MON-FRI", I think?) , but I'm aiming to use the if/else conditionals so I can keep everything in the same job. I've tried using a combination of {{job.start_time.day}} and {{job.trigger.time.is_weekday}} in the conditions, however, this will still runs if the first day of the month is a Sunday. I think I'm going to need to check if the current day is the second day and a weekday, but also check if the previous day is also a weekday, but I'm at a loss on how to do this.
On a month where the second working day lands between Tuesday-Friday, it works fine. On a month where the second working day lands between Saturday-Monday, it doesn't.
| Date | Day Name | Run Status |
|---|---|---|
| 2025-08-30 | Tue | No |
| 2025-09-01 | Wed | No |
| 2025-09-02 | Thu | Yes - This is the second working day of the month |
| 2025-09-03 | Fri | No |
| ... | ... | ... |
| 2025-10-31 | Fri | No |
| 2025-11-01 | Sat | No |
| 2025-11-02 | Sun | No |
| 2025-11-03 | Mon | No |
| 2025-11-04 | Tue | Yes - This is the second working day of the month |
I'm guessing I'm going to need many if/else conditions to check the 2nd, 3rd, and 4th days, but also checking if the previous was also a working day (which I don't know how to do). Or, thinking about it, would I just put the logic in a notebook and grab the output?
Any guidance will be much appreciated.
Thanks in advance.
