Call dll thru windows service?
Below code call my dll as i expected but am not sure how efficient am doing this,bcoz this is my first windows service ever,so if you guys find anything wrong or suggest best way to handle is much appreciated

Thanks in Advance

    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 Dist= new Shell();
            Dist.Distribute();
        }

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

        }
        private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            // ignore the time, just compare the date
            if (_lastRun.Date < DateTime.Now.Date)
            {
                // stop the timer while we are running the cleanup task
                _timer.Stop();
                //
                // do cleanup stuff
                //
                _lastRun = DateTime.Now;
                _timer.Start();
            }

        }
Call dll thru windows service?
===

Below code call my dll as i expected but am not sure how efficient am doing this,bcoz this is my first windows service ever,so if you guys find anything wrong or suggest best way to handle is much appreciated

Thanks in Advance

    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 Dist= new Shell();
            Dist.Distribute();
        }

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

        }
        private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            // ignore the time, just compare the date
            if (_lastRun.Date < DateTime.Now.Date)
            {
                // stop the timer while we are running the cleanup task
                _timer.Stop();
                //
                // do cleanup stuff
                //
                _lastRun = DateTime.Now;
                _timer.Start();
            }

        }