private void OnTimeElapsed(object source, ElapsedEventArgs e) { Logger.Info("Pdf Extract Process Started"); AutoTrackPdf autoTrackPdf = new AutoTrackPdf(); autoTrackPdf.Extract(); Logger.Info("Pdf Extract Process Ended"); }
protected override void OnStart(string[] args) { Logger.Info("Pdf Extract Process Started"); AutoTrackPdf autoTrackPdf = new AutoTrackPdf(); autoTrackPdf.Extract(); Logger.Info("Pdf Extract Process Ended"); timer.Elapsed += new ElapsedEventHandler(OnTimeElapsed); timer.Interval = Convert.ToInt32(ConfigurationManager.AppSettings["ServiceRunAtEvery"]); timer.Enabled = true; }