In this article it is explained how to exclude Quartz from running on specific calendar days, but what I need is something different, I need to run the job in the previous or next business day if the trigger calendar results on a holiday.
For example, assume the job is scheduled to run monthly, including Friday, 29 March 2019 that is a holiday.
This means that:
One way to achieve this is to run the job every day and analyze whether it should run on that day or not, and retrigger if necessary, but is there a better way?
UPDATE
If I have to trigger the job every day, why not use instead the Java EE 8 TimerService?
I would suggest to run it on every working day using Cron Expression for example (Running every weekday at 5 PM)
0 00 17 * * MON-FRI
and Inside a function which gets invoked by Cron expression, you can call holidayService.isHoliday(date) which will tell if the date is a holiday. If it is Holiday then you can skip running the report.