Windows Service doesn't start based on the interval time
<p>I wrote a windows service to call my class library every 10 mins interval,it works fine when  start or restart .once the job done it suppose to re run again every 10 min's that's not happening at all.Am not sure what am missing,some one please identify the correct way.</p>

<p>Here is my code</p>

<pre><code> public partial class Service1 : ServiceBase
{
    private Timer _timer;
    private DateTime _lastRun = DateTime.Now;

    public Service1()
    {
        InitializeComponent();
    }

    protected override void OnStart(string[] args)
    {
        log4net.Config.XmlConfigurator.Configure();

        _timer = new Timer(10 * 60 * 1000); // every 10 minutes
        _timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
        Shell Distribute= new Shell();
        Distribute.Distribute();
    }

    protected override void OnStop()
    {
        this.ExitCode = 0;
        base.OnStop();

    }
    private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
    {
       //if (_lastRun.Date &lt; DateTime.Now.Date)
        //{
            _timer.Stop();
           _lastRun = DateTime.Now;
            _timer.Start();
         //}
        }

    }
}
</code></pre>
