protected override void OnStart(string[] args) { Task.Factory.StartNew(() => { log.Info("Start push"); while (_bRunning) { log.Info("Start push company"); ControlCmpCrlw.PushCmp(); log.Debug("Wait 10' to next"); Thread.Sleep(60000 * 5); } log.Info("Stop push"); }); }
private static void Main() { log.Info("Start app"); while (true) { log.Info("Start push company"); ControlCmpCrlw.PushCmp(); log.Debug("Wait 10' to next"); Thread.Sleep(60000 * 5); } return; ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new Service1() }; ServiceBase.Run(ServicesToRun); }
public void PushCmpFnTest() { ControlCmpCrlw.PushCmp(); }