title: .NET 4.5 Quartz Job not Firing Global.asax.cs Application_Start
body: <p>I've been trying to get a Quartz.net job to fire inside my application and am having no luck.  I wrote a test app in Visual Studio 2013 which works fine using a main method, but this is not firing in the actual application.</p>
  
  <p>From what I've read, if I want something to run when the application pool is started I need a Global.asax.cs file to be placed in the App_Code folder (note that I am NOT using MVC).  Then there should be a method <strong>Application_Start</strong> that will initialize the Quartz job.</p>
  
  <p>So I placed the following into <strong>Global.asax.cs</strong>:</p>
  
  <pre><code>public class Global
  {
      protected void Application_Start(object sender, EventArgs e)
      {
          System.Diagnostics.Debug.Write("Hello via Debug!");
          // construct a scheduler factory
          ISchedulerFactory schedFact = new Quartz.Impl.StdSchedulerFactory();
  
          // get a scheduler
          IScheduler sched = schedFact.GetScheduler();
          sched.Start();
  
          // define the job and tie it to our HelloJob class
          IJobDetail job = JobBuilder.Create&lt;MyJob&gt;()
              .WithIdentity("myJob", "group1")
              .Build();
  
          // Trigger the job to run now, and then every 40 seconds
          ITrigger trigger = TriggerBuilder.Create()
            .WithIdentity("myTrigger", "group1")
            .StartNow()
            .WithSimpleSchedule(x =&gt; x
                .WithIntervalInSeconds(5)
                .RepeatForever())
            .Build();
  
          sched.ScheduleJob(job, trigger);
      }
  }
  </code></pre>
  
  <p>I have a job in another class (again, works just fine in a standard .net console app).</p>
  
  <pre><code>    public void Execute(IJobExecutionContext context)
      {
          log.Info("\n--------------------MyJob Executing via Quartz--------------------");
          log.Info("every 5 sec.");
  
      }
  </code></pre>
  
  <p>But, I'm not getting any output to the log.  Would someone mind telling me what I'm doing wrong here?</p>