title: C# help on realtime configuration of interval using quartz
body: <p>I need to make the interval dependent on the database configuration. </p>
  
  <p>so for example the console application runs with 10 second interval, if i change the interval for 20 seconds its going to follow the new interval without closing the console application. </p>
  
  <p>Here's the current configuration:</p>
  
  <pre><code>NameValueCollection properties = new NameValueCollection();
  properties["quartz.threadPool.threadCount"] = "1";
  
  ISchedulerFactory schedFact = new StdSchedulerFactory(properties);
  IScheduler sched = schedFact.GetScheduler();
  
  sched.Start();
  // define the job and tie it to our HelloJob class
  IJobDetail job = JobBuilder.Create&lt;Run&gt;()
      .WithIdentity("myJob", "group1") // name "myJob", group "group1"
      .Build();
  
  
  // Trigger the job to run now, and then every 30 seconds
  ITrigger trigger = TriggerBuilder.Create()
      .WithIdentity("myTrigger", "group1")
      .StartNow()
      .WithSimpleSchedule(f =&gt; f.WithIntervalInSeconds(10)
                                .RepeatForever())
      .WithPriority(1)
      .Build();
  
  
  // Tell quartz to schedule the job using our trigger
  sched.ScheduleJob(job, trigger);
  </code></pre>