Advanced CRON expressions
The advanced CRON expression parser of JobRunr Pro supports your most difficult scheduling requirements.
JobRunr Pro has support for more difficult CRON expressions.
See some examples below:
BackgroundJob.scheduleRecurrently(Cron.firstDayOfTheMonth(10, 30), () -> System.out.println("First day of the month!"));
BackgroundJob.scheduleRecurrently(Cron.firstBusinessDayOfTheMonth(10, 30), () -> System.out.println("First business day of the month!"));
BackgroundJob.scheduleRecurrently(Cron.lastDayOfTheMonth(10), () -> System.out.println("Last day of the month!"));
BackgroundJob.scheduleRecurrently(Cron.lastBusinessDayOfTheMonth(10, 30), () -> System.out.println("Last business day of the month!"));
Advanced CRON example
You can also create some more fancier CRON expressions like:
BackgroundJob.scheduleRecurrently("0 0 LW-3 * *", () -> System.out.println("Three days before the business day of the month!"));