Step 3 of 21 · 3 minutes

Month-End Reports

The Scenario

Monthly credit card statements must be generated on the last business day of each month, not just the last calendar day.

If the 31st falls on a Saturday, the reports should run on Friday the 30th instead.

The Challenge

Standard cron expressions can't handle business day logic. How do we schedule jobs for complex calendar-based scenarios?

The Solution

JobRunr Pro's advanced CRON parser supports business day expressions! Use Cron.lastBusinessDayOfTheMonth() or the expression "0 0 LW * *".

Other options include firstBusinessDayOfTheMonth() and expressions like "0 0 LW-3 * *" for 3 days before the last business day.

Read the documentation →

Try It Yourself

Check the Recurring Jobs dashboard to see the monthly statement job scheduled for the last business day. The next run time automatically adjusts for weekends!
You need to log in to perform write operations. You can still view the code solution and dashboard.