예제 #1
0
        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");
        }
예제 #2
0
        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;
        }