title: JAVA Quartz - Skip job if previous is still running AND wait for the next schedule time
body: <p>I have a Java solution that uses <code>Quartz 2.2.3</code>, and what I have is:</p>
  
  <ul>
  <li>My job class is annotated <code>@DisallowConcurrentExecution</code> to avoid concurrence, so the same job just can run once per time (OK)</li>
  <li>It is a CRON and runs every 1 hour (OK)</li>
  <li>The time is 1pm and the the job starts run (OK)</li>
  <li>Now the time is 2pm and the previous job didn't finish yet (OK)</li>
  <li>As the class is annotated the next job will not start (IT IS GREAT - OK)</li>
  <li>Now the time is 2h:15min and the first job just finished (OK)</li>
  <li>Now the issue, as the second job didn't start at 2pm BUT now the first just finished, the second one will start.</li>
  </ul>
  
  <p>This is my problem, I don't want to make the second job wait if the previous didn't finish, I want to skip the second one and when the time turns <code>3pm</code> the job can run. Reading javadoc I added the <code>withMisfireHandlingInstructionDoNothing()</code> but it didn't work. </p>
  
  <p>I think I'm doing something wrong or missing something.</p>
  
  <p>My code:</p>
  
  <pre><code>Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();
  
  JobDetail job = JobBuilder.newJob(TestCronService.class).withIdentity("testA","testB").build();
  
  
  CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity("testA","testB")
  .withSchedule(CronScheduleBuilder.cronSchedule("0 0 * * * ?")
  .withMisfireHandlingInstructionDoNothing())
  .build();
  
  
  scheduler.scheduleJob(job, trigger);
  scheduler.start();
  </code></pre>