
Originally Posted by
jimpo
Finally got misfires working with CronTrigger as I would want them to.
1) <property name="overwriteExistingJobs" value="true" /> causes a problem, since it will overwrite all triggers when quartz starts up (doh!) - overwriting the NEXT_FIRE_TIME and hence never misfiring any triggers.
2) At some point I changed the misfire threshold to 1 "to make sure misfires are always detected" (some page actually suggested this solution) - well, this is not very good either since this way Quartz detects that the job has misfired, changes status to MISFIRED, calls trigger to determine next fire time, changes job status to WAITING with new fire time - and before the trigger has chance to fire, it is already updated to MISFIRED status again. So better use something like 5000 instead.
I am sure there were other overlapping issues as well, but I cannot describe other than these two anymore. Now the CronTrigger misfires work as I would expect.
I now use MISFIRE_INSTRUCTION_SMART_POLICY instead of MISFIRE_INSTRUCTION_FIRE_ONCE_NOW, not sure if this has any effect.