title: Cron Job Only Executes Once?
body: <p>I am trying to create a quartz scheduler for cron jobs in Quartz.NET (<em>version 2.4.1.0</em>). I have one job that fires at its specified interval, and another that fires once in the start and never fires again (it also has a specified interval).<br>
  I am a little stumped as the only variation in these jobs is their names and CronSchedules (found in the triggers).</p>
  
  <blockquote>
    <p><strong>Note:</strong> I have researched similar problems to this online (as well as Stack Overflow) and I have found nothing that solves my problem.<br>
    My DB connection works perfectly (UID/PWD left blank in this example).<br>
    All Cron Expressions have been tested in CronMaker and are valid.</p>
  </blockquote>
  
  <h3>App.Config</h3>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt;
    &lt;/configSections&gt;
    &lt;quartz&gt;
      &lt;add key="quartz.scheduler.instanceName" value ="MyScheduler"/&gt;
      &lt;!--5 is recommended for under 100 jobs--&gt;
      &lt;add key="quartz.threadPool.threadCount" value ="5"/&gt;
      &lt;add key="quartz.jobStore.useProperties" value =" false"/&gt;
      &lt;add key="quartz.jobStore.clustered" value ="false"/&gt;
      &lt;add key="quartz.jobStore.misfireThreshold" value ="60000"/&gt;
      &lt;add key="quartz.jobStore.type" value ="Quartz.Impl.AdoJobStore.JobStoreTX, Quartz"/&gt;
      &lt;add key="quartz.jobStore.driverDelegateType" value ="Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz"/&gt;
      &lt;add key="quartz.jobStore.tablePrefix" value ="QRTZ_"/&gt;
      &lt;add key="quartz.jobStore.dataSource" value ="myDS"/&gt;
      &lt;!--DB CONNECTION--&gt;
      &lt;add key="quartz.dataSource.myDS.connectionString" value ="Server=localhost;Database=QUARTZ;Uid=;Pwd="/&gt;
      &lt;add key="quartz.dataSource.myDS.provider" value ="SqlServer-20"/&gt;
    &lt;/quartz&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <h3>Program.cs</h3>
  
  <blockquote>
    <p><strong>Note:</strong> Job 3 is successfully firing every minute. Job 4 fires once at the start and then stops firing (should be every 30 seconds).</p>
  </blockquote>
  
  <p>Jobs:  </p>
  
  <pre><code>public class Job3 : IJob
          {
              public void Execute(IJobExecutionContext context)
              {
                  Console.WriteLine("Job 3");
              }
          }
  
  public class Job4 : IJob
          {
              public void Execute(IJobExecutionContext context)
              {
                  Console.WriteLine("Job 4");
              }
          }
  </code></pre>
  
  <p>Job Details:  </p>
  
  <pre><code>IJobDetail jdJob3 = JobBuilder.Create&lt;Job3&gt;()
                          .WithIdentity("job3", "group3")
                          .WithDescription("CRON TRIGGER - Job meant to run constantly at 1min intervals")
                          .StoreDurably(true)
                          .Build();
  
  IJobDetail jdJob4 = JobBuilder.Create&lt;Job4&gt;()
                          .WithIdentity("job4", "group3")
                          .WithDescription("CRON TRIGGER - Job meant to run constantly at 30sec intervals")
                          .StoreDurably(true)
                          .Build();
  </code></pre>
  
  <p>Triggers:  </p>
  
  <pre><code>//Day Of Month - fires every minute
  ITrigger tChron2 = TriggerBuilder.Create()
       .WithIdentity("myTrigger3", "group3")
       .WithCronSchedule("0 0/1 * * * ?", x =&gt; x
            .InTimeZone(TimeZoneInfo.FindSystemTimeZoneById("Central America Standard Time"))
            .WithMisfireHandlingInstructionFireAndProceed()) //handle misfire
        .ForJob("job3", "group3")
        .Build();
  
  //Day Of Month - fires every 30sec, between 8am and 2pm, on the 26th of every month, any year
  ITrigger tChron3 = TriggerBuilder.Create()
       .WithIdentity("myTrigger4", "group3")
       .WithCronSchedule("0,30 * 8-14 26 * ?", x =&gt; x
            .InTimeZone(TimeZoneInfo.FindSystemTimeZoneById("Central America Standard Time"))
            .WithMisfireHandlingInstructionFireAndProceed()) //handle misfire
       .ForJob("job4", "group3")
       .Build();
  </code></pre>
  
  <p>Job Listener:</p>
  
  <pre><code>public class MyJobListener : IJobListener
      {
          void IJobListener.JobExecutionVetoed(IJobExecutionContext context)
          {
              throw new NotImplementedException();
          }
  
          void IJobListener.JobToBeExecuted(IJobExecutionContext context)
          {
              Console.WriteLine("\r\nJob is about to be executed...");
          }
  
          void IJobListener.JobWasExecuted(IJobExecutionContext context, JobExecutionException jobException)
          {
              Console.WriteLine("Job was executed...");
          }
  
          public string Name { get; set; }
      }
  
  //IMPLEMENTATION    
  MyJobListener myJobListener = new MyJobListener();
  myJobListener.Name = "MyJobListener1";
  scheduler.ListenerManager.AddJobListener(myJobListener, GroupMatcher&lt;JobKey&gt;.AnyGroup());
  </code></pre>
  
  <h3>OUTPUT</h3>
  
  <p><a href="https://i.stack.imgur.com/o7wUk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o7wUk.png" alt="enter image description here"></a></p>
  
  <p><strong>Any ideas on what could be causing this?</strong></p>