I am working with a quartz implementation in a Java web app. We have implemented the TriggerListener class so when a trigger fires, it calls the vetoJobExecution(Trigger trigger, JobExecutionContext jobExecutionContext) method. We check a reference table to see if the job should run or not. All of this works fine.
The part that is broken is if the job should NOT run, so the vetoJobExecution method returns false. After that happens, the trigger will never fire again. This is the part I do not understand. It seems like the trigger should continue firing, and the vetoJobExecution method should keep being called to see if the job should run. This simply doesn't happen - once the job is vetoed, the trigger does not fire again and the vetoJobExecution method is never called.
We are using Quartz 1.5.2 (yeah it's old, I know).
What is the correct strategy for having a quartz job not run using the TriggerListener interface, yet still having the trigger fire next time?
Fixed by upgrading to version 1.7.3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With