title: Quartz.net - How to skip to next_fire_time?
body: <p>I am using Quartz.net to run the job. I am not able to find a way to skip the current trigger and wait for next fire time.. </p>
  
  <p>I want to run my job everyday at 3 AM to 6 AM. But I want to stop running and wait for next day if I get the status that I want before 6 AM. </p>
  
  <p>Here is the code that I try but doesn't work. Any idea how to fix it? </p>
  
  <p><strong>Program</strong></p>
  
  <pre><code>        IScheduler scheduler = StdSchedulerFactory.GetDefaultScheduler();
          scheduler.Start();
  
          IJobDetail myjob = JobBuilder.Create&lt;MyJob&gt;()
                      .WithIdentity("MyJob")
                      .Build();
  
          ITrigger myTrigger = TriggerBuilder.Create()
              .WithIdentity("MyTrigger")
              .WithDailyTimeIntervalSchedule(
                        x =&gt; x.StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(3, 00))
                       .EndingDailyAt(TimeOfDay.HourMinuteAndSecondOfDay(6, 00, 00))                         
                       .WithIntervalInSeconds(10))                
              .Build();
  
  
          scheduler.ScheduleJob(myjob , myTrigger );
  </code></pre>
  
  <p><strong>MyJob</strong></p>
  
  <pre><code>   public class MyJob: IInterruptableJob {
  
      static int i=0;
  
      public void Execute(IJobExecutionContext context) { 
  
          Console.WriteLine("Call WebService to get the status");
  
          i++; //Just to simulate the status
          if (i &gt; 5) {  //Here, I got the status so stop the timer and run at next-fire-time
  
               ITrigger myTrigger = TriggerBuilder.Create()
              .WithIdentity("MyTrigger")
              .WithDailyTimeIntervalSchedule(
                        x =&gt; x.StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(3, 00))
                       .EndingDailyAt(TimeOfDay.HourMinuteAndSecondOfDay(6, 00, 00))                         
                       .WithIntervalInSeconds(10))                
              .Build();
  
  
              context.Scheduler.RescheduleJob(context.Trigger.Key, myTrigger );
          }
  
      public void Interrupt() {
          Console.WriteLine("Interrupt from MyJOb!");
      }
  }
  </code></pre>