Beispiel #1
0
 protected override void OnStart(string[] args)
 {
     WorkHelper.Log("Service started");
     WorkHelper.LogSysInfo();
     _timer = new Timer
     {
         AutoReset = true,
         Interval  = 1000 * 60 * 30,
         Enabled   = true
     };
     _timer.Elapsed += OnTimedEvent;
 }
Beispiel #2
0
 protected override void OnStop()
 {
     WorkHelper.Log($"Service is stopped!");
 }