title: Quartz.net not firing and not throwing error
body: <p>I'm attempting to run a Quartz.net scheduler using HttpModules as we don't have access to the Global.ascx.  The code up to the point of the executing the job seems to be working fine but when it comes to the job itself it doesn't fire nor is any error thrown. I've even gone as far as making the job as simple as a redirect in case there was just something not working in the code but that doesn't fire either. Anyone have success with Quartz.net working in this way?  </p>
  
  <p>Here is the HTTPModule:</p>
  
  <pre><code>public void Init(HttpApplication application)
      {
          application.BeginRequest += (new EventHandler(this.Application_BeginRequest));
          application.EndRequest += (new EventHandler(this.Application_EndRequest));
      }
  
      // Your BeginRequest event handler.
      private void Application_BeginRequest(Object source, EventArgs e)
      {
          try
          {
              Auction123CSVScheduler.Start();
          }
          catch (Exception ex)
          {
              throw ex;
          }
      }
  
      // Your EndRequest event handler.
      private void Application_EndRequest(Object source, EventArgs e)
      {
  
      }
  
      public void Dispose()
      {
      }
  </code></pre>
  
  <p>Here is the scheduler:</p>
  
  <pre><code>public class Auction123CSVScheduler
  {
      public Auction123CSVScheduler()
      {
          //
          // TODO: Add constructor logic here
          //
      }
  
      public static void Start()
      {
          try
          {
              IScheduler scheduler = StdSchedulerFactory.GetDefaultScheduler();
              scheduler.Start();
  
              IJobDetail job = JobBuilder.Create&lt;Auction123CSVJob&gt;().Build();
  
              ITrigger trigger = TriggerBuilder.Create()
                  .StartNow().WithSimpleSchedule(x =&gt; x.WithIntervalInSeconds(120).RepeatForever()).Build();
  
              scheduler.ScheduleJob(job, trigger);
  
          }
          catch (SchedulerException se)
          {
              throw se;
          }
      }
  }
  </code></pre>
  
  <p>And here is our Job:</p>
  
  <pre><code>public class Auction123CSVJob : IJob
  {
      public void Execute(IJobExecutionContext context)
      {
          try
          {
              VehiclesDataSet vds = new VehiclesDataSet();
  
              DataSet ds = vds.Auction123Info();
  
              CreateCSVFile(ds);
          }
          catch (Exception e)
          {
              throw new JobExecutionException(e);
          }
      }
  
  
      //create csv file format from dataset passed in and save to the file system
      private void CreateCSVFile(DataSet ds)
      {
  
          if (ds.Tables.Count &gt; 0)
          {
              //make the dataset into a datatable for use with streamwriter
              DataTable dt = ds.Tables[0];
  
              try
              {
                  //identify file path. set to overwrite
                  StreamWriter sw = new StreamWriter("c://inetpub/wwwroot/customer/myfile.txt", false);
  
                  //write headers
                  for (int c = 0; c &lt; dt.Columns.Count; c++)
                  {
                      sw.Write(dt.Columns[c]);
                      if (c &lt; dt.Columns.Count - 1)
                      {
                          sw.Write("|");
                      }
                  }
  
                  sw.Write(sw.NewLine);
  
                  //write content items
                  foreach (DataRow dr in dt.Rows)
                  {
                      for (int i = 0; i &lt; dt.Columns.Count; i++)
                      {
                          if (!Convert.IsDBNull(dr[i]))
                          {
                              sw.Write(dr[i].ToString());
                          }
  
                          if (i &lt; dt.Columns.Count - 1)
                          {
                              sw.Write("|");
                          }
                      }
  
                      sw.Write(sw.NewLine);
                  }
  
                  sw.Close();
              }
              catch (Exception ex)
              {
                  throw new JobExecutionException(ex);
              }
          }
      }
  }
  </code></pre>