コード例 #1
0
 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");
     });
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void PushCmpFnTest()
 {
     ControlCmpCrlw.PushCmp();
 }