I tried the bundled in misfire example exampel5, and I don't understand at all what is going on with the misfires. As far as I can understand, misifires don't seem to work at all like they should.
Javadocs of org.quartz.examples.example.MisfireExample say that
Code:
* While the example is running, you should note that there are two triggers
* with identical schedules, firing identical jobs. The triggers "want" to fire
* every 3 seconds, but the jobs take 10 seconds to execute. Therefore, by the
* time the jobs complete their execution, the triggers have already "misfired"
* (unless the scheduler's "misfire threshold" has been set to more than 7
* seconds). You should see that one of the jobs has its misfire instruction
* set to <code>SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT</code>,
* which causes it to fire immediately, when the misfire is detected. The other
* trigger uses the default "smart policy" misfire instruction, which causes
* the trigger to advance to its next fire time (skipping those that it has
* missed) - so that it does not refire immediately, but rather at the next
* scheduled time.
Which I understand, should mean that when running the example I should see the two jobs starting and stopping at different times. They are not. Both jobs keep starting and stopping at same times. They start at :00, run for 10 seconds, finish at :10, immediately start again, finish next time at :20, start again immediately, etc.
Code:
-o-group1.statefulJob1 executing.[Mon Feb 04 14:06:00 EET 2008]
-o-group1.statefulJob2 finished.[Mon Feb 04 14:06:00 EET 2008]
[DEBUG] 04 helmi 02:06:00.078 PM DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.statefulJob2', class=org.quartz.examples.example5.StatefulDumbJob
[DEBUG] 04 helmi 02:06:00.078 PM DefaultQuartzScheduler_Worker-6 [org.quartz.core.JobRunShell]
Calling execute on job group1.statefulJob2
-o-group1.statefulJob2 executing.[Mon Feb 04 14:06:00 EET 2008]
-o-group1.statefulJob1 finished.[Mon Feb 04 14:06:10 EET 2008]
[DEBUG] 04 helmi 02:06:10.078 PM DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.statefulJob1', class=org.quartz.examples.example5.StatefulDumbJob
[DEBUG] 04 helmi 02:06:10.078 PM DefaultQuartzScheduler_Worker-1 [org.quartz.core.JobRunShell]
Calling execute on job group1.statefulJob1
-o-group1.statefulJob1 executing.[Mon Feb 04 14:06:10 EET 2008]
-o-group1.statefulJob2 finished.[Mon Feb 04 14:06:10 EET 2008]
[DEBUG] 04 helmi 02:06:10.093 PM DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.statefulJob2', class=org.quartz.examples.example5.StatefulDumbJob
[DEBUG] 04 helmi 02:06:10.093 PM DefaultQuartzScheduler_Worker-5 [org.quartz.core.JobRunShell]
Calling execute on job group1.statefulJob2
-o-group1.statefulJob2 executing.[Mon Feb 04 14:06:10 EET 2008]
-o-group1.statefulJob1 finished.[Mon Feb 04 14:06:20 EET 2008]
[DEBUG] 04 helmi 02:06:20.078 PM DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.statefulJob1', class=org.quartz.examples.example5.StatefulDumbJob
[DEBUG] 04 helmi 02:06:20.078 PM DefaultQuartzScheduler_Worker-3 [org.quartz.core.JobRunShell]
Calling execute on job group1.statefulJob1
-o-group1.statefulJob1 executing.[Mon Feb 04 14:06:20 EET 2008]
-o-group1.statefulJob2 finished.[Mon Feb 04 14:06:20 EET 2008]
[DEBUG] 04 helmi 02:06:20.093 PM DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.statefulJob2', class=org.quartz.examples.example5.StatefulDumbJob
[DEBUG] 04 helmi 02:06:20.093 PM DefaultQuartzScheduler_Worker-2 [org.quartz.core.JobRunShell]
Calling execute on job group1.statefulJob2
Are there some known issues with misfires on 1.5.2, am I doing something wrong, are the examples wrong, can anyone help? Does someone actually use the misfires successfully?