Hello!
I have an app which is using an old version of quartz and I'm trying to upgrade to quartz 2.0.1. I am trying to take advantage of the new misfire instruction MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY, as I am not using quartz misfire mechanism.
However, while trying to create a new CronTrigger using this instruction, I get the following exception:
java.lang.IllegalArgumentException: The misfire instruction code is invalid for this type of trigger.
at org.quartz.impl.triggers.AbstractTrigger.setMisfireInstruction(AbstractTrigger.java:690)
[calling code stacktrace follows, omitted for clarity]
The code to create the CronTrigger is like this:
CronTriggerImpl newTrigger = new CronTriggerImpl("CronTrigger", "CronTriggerGroup", "CronTriggerGroup", getCronExpression());
newTrigger.setDescription("Cron Trigger");
newTrigger.setMisfireInstruction(CronTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY);
Is MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY supposed to work with CronTrigger? Or am I missing something?
Best regards,
Florin.
|