Issue
Right now, I only know how to set it to the first of the month (irrespective of whether it's a weekend). The sample code from the task is a follows:
SCHEDULE = 'USING CRON 0 2 1 * * Europe/Dublin'
Solution
I don't think it is possible to schedule a task to run on the first non-weekend day of the month.
Workaround:
- Schedule your job to run on days 1-3 and call a stored procedure
- Inside your SP, check if the job is already executed this month (you may use a table to persist the last run)
- Insider your SP, check if it's a weekday, else end the SP without executing the rest of the task
Answered By - Gokhan Atil Answer Checked By - Marie Seifert (WPSolving Admin)