title: Thread in Global.asax does not work after publishing the web site
body: <p>I am developing a web application where I have implemented job scheduler using Global.asax. I have used thread to start the job for particular duration. </p>
  
  <p>It works fine if I run the application through visual studio. But when I publish and deploy it to the server the thread doesn't work.</p>
  
  <p>Please help me to resolve this issue. Is there any alternative for this.</p>
  
  <p>Please find the sample code below,</p>
  
  <pre><code>protected void Application_Start()
      {
          Thread thread = new Thread(new ThreadStart(ThreadFunc));
          thread.IsBackground = true;
          thread.Name = "ThreadFunc";
          thread.Start();
      }
  
      protected void ThreadFunc()
      {
          System.Timers.Timer t = new System.Timers.Timer();
          t.Elapsed += new System.Timers.ElapsedEventHandler(TimerWorker);
          t.Interval = 10000;
          t.Enabled = true;
          t.AutoReset = true;
          t.Start();
      }
  
      protected void TimerWorker(object sender, System.Timers.ElapsedEventArgs e)
      {
          //work args
      }
  </code></pre>
  
  <p>Thanks,</p>
  
  <p>Vijay</p>