title: Quartz Scheduler takes two days to identify misfired job
body: <p><strong>How do I get Quartz Schedulers to identify a missed job earlier?</strong></p>
  
  <p>Job was meant to be fired at at <strong>05-12-2014 08:00:00.000</strong> but was only identified at <strong>2014-12-07 23:34:15,800</strong></p>
  
  <pre><code>2014-12-07 23:34:15,800 INFO  [QuartzScheduler_sharedQuartzScheduler-NON_CLUSTERED_MisfireHandler] [,,] [org.quartz.plugins.history.LoggingTriggerHistoryPlugin] Trigger [expiryBreachTrigger.11854] misfired job [Breach.11854]. Should have fired at:  05-12-2014 08:00:00.000
  2014-12-07 23:34:15,825 INFO  [sharedQuartzScheduler_Worker-40] [,,] [org.quartz.plugins.history.LoggingTriggerHistoryPlugin] Trigger [expiryBreachTrigger.11854] fired job [Breach.11854] scheduled at:  07-12-2014 23:34:15.801, next scheduled at: null
  2014-12-07 23:34:15,844 ERROR [sharedQuartzScheduler_Worker-40] [,,] [nz.co.chorus.com.om.service.service.impl.JeopardyManagementServiceImpl] An error occurred while scheduling expiration job for event id 11854: org.quartz.ObjectAlreadyExistsException: Unable to store Job : 'Breach.11854', because one already exists with this identification.
  2014-12-07 23:34:15,846 INFO  [sharedQuartzScheduler_Worker-40] [,,] [org.quartz.plugins.history.LoggingTriggerHistoryPlugin] Trigger [expiryBreachTrigger.11854] completed firing job [Breach.11854] with resulting trigger instruction code: RE-EXECUTE JOB. Next scheduled at: null
  2014-12-07 23:34:15,846 INFO  [sharedQuartzScheduler_Worker-40] [,,] [org.quartz.plugins.history.LoggingTriggerHistoryPlugin] Trigger [expiryBreachTrigger.11854] fired job [Breach.11854] scheduled at:  07-12-2014 23:34:15.801, next scheduled at: null
  2014-12-07 23:34:15,846 INFO  [sharedQuartzScheduler_Worker-40] [,,] [org.quartz.plugins.history.LoggingJobHistoryPlugin] Job [Breach.11854] to be fired by trigger [expiryBreachTrigger.11854], re-fire: 1
  2014-12-07 23:34:15,846 DEBUG [sharedQuartzScheduler_Worker-40] [,,] [org.quartz.core.JobRunShell] Calling execute on job Breach.11854
  2014-12-07 23:34:15,855 INFO  [eventLoggerContainer-1] [,,] [nz.co.chorus.com.event.listener.EventLoggerListener] Event Logger: null
  2014-12-07 23:34:15,859 INFO  [sharedQuartzScheduler_Worker-40] [,,] [org.quartz.plugins.history.LoggingJobHistoryPlugin] Job [Breach.11854] execution complete and reports: null
  2014-12-07 23:34:15,859 INFO  [sharedQuartzScheduler_Worker-40] [,,] [org.quartz.plugins.history.LoggingTriggerHistoryPlugin] Trigger [expiryBreachTrigger.11854] completed firing job [Breach.11854] with resulting trigger instruction code: DELETE TRIGGER. Next scheduled at: null
  </code></pre>
  
  <p>Once the job was identified as a misfired job it was rescheduled correctly but as you can see there is an exception, <strong>ObjectAlreadyExistsException</strong> but this results in the trigger instruction <strong>RE-EXECUTE JOB</strong> and then the job is run correctly.</p>
  
  <p>Problem is two days two identify this missed job is <strong>too</strong> long</p>
  
  <pre><code>final Trigger trigger = TriggerBuilder
              .newTrigger()
              .withIdentity(Objects.toString(jeopardyEventId),
                      "expiry" + jobGroup + "Trigger")
              .startAt(expirationTime).build();
  </code></pre>
  
  <p>Maybe I need to Build the trigger with the misfire instruction</p>
  
  <pre><code>.withMisfireHandlingInstructionIgnoreMisfires()
  </code></pre>
  
  <p>but my understanding this just implies that when it's found it will always run the job and not consult the smart policy.</p>
  
  <p><strong>quartz.properties file</strong></p>
  
  <pre><code>org.quartz.plugin.triggerHistory.class=org.quartz.plugins.history.LoggingTriggerHistoryPlugin
  org.quartz.plugin.triggerHistory.triggerFiredMessage=Trigger [{1}.{0}] fired job [{6}.{5}] scheduled at: {2, date, dd-MM-yyyy HH:mm:ss.SSS}, next scheduled at: {3, date, dd-MM-yyyy HH:mm:ss.SSS}
  org.quartz.plugin.triggerHistory.triggerCompleteMessage=Trigger [{1}.{0}] completed firing job [{6}.{5}] with resulting trigger instruction code: {9}. Next scheduled at: {3, date, dd-MM-yyyy HH:mm:ss.SSS}
  org.quartz.plugin.triggerHistory.triggerMisfiredMessage=Trigger [{1}.{0}] misfired job [{6}.{5}]. Should have fired at: {3, date, dd-MM-yyyy HH:mm:ss.SSS}
  org.quartz.plugin.jobHistory.class=org.quartz.plugins.history.LoggingJobHistoryPlugin
  org.quartz.plugin.jobHistory.jobToBeFiredMessage=Job [{1}.{0}] to be fired by trigger [{4}.{3}], re-fire: {7}
  org.quartz.plugin.jobHistory.jobSuccessMessage=Job [{1}.{0}] execution complete and reports: {8}
  org.quartz.plugin.jobHistory.jobFailedMessage=Job [{1}.{0}] execution failed with exception: {8}
  org.quartz.plugin.jobHistory.jobWasVetoedMessage=Job [{1}.{0}] was vetoed. It was to be fired by trigger [{4}.{3}] at: {2, date, dd-MM-yyyy HH:mm:ss.SSS}
  org.quartz.jobStore.misfireThreshold=600000
  org.quartz.threadPool.threadCount=50
  org.quartz.scheduler.skipUpdateCheck=true
  </code></pre>