on-internet
← Community

How do I run a task on the 2nd working day of the month?

Stack Overflow ·

My job runs daily and I want to start a task on the second working day of the month. I can set up another job and use cron pattern 0 0 0 2W ? MON-FRI but I want to keep everything in the same job. A combination of {{job.start_time.day}} and {{job.trigger.time.is_weekday}} in if/else conditions still runs if the first day of the month is a Sunday. How do I check if the current day is the second day, a weekday, and if the previous day is also a weekday? On a month where the second working day is between Tuesday and Friday it works. On a month where the second working day is between Saturday and

Comments

Sign in or sign up to comment and upvote.

No comments yet.