c# - A timeout was reached (30000 milliseconds) while waiting for the service to connect -


can 1 please check doing onstart correct or not please. getting error service started , stopped automatically. want run service every 10 minutes. please been 4 hours struggling

 protected override void onstart(string[] args)         {             try             {                 _atimer.start();                  _atimer.enabled = true;                 _atimer = new system.timers.timer(10 * 60 * 1000);//10 minutes                  _atimer.autoreset = true;                 _atimer.elapsed += new system.timers.elapsedeventhandler(_atimer_elapsed);             }             catch(exception ex) {                 rmlogger.rmexception("servicemanager", this.gettype().name.tostring(), ex.tostring());             }             } 

i think have things little confused here.

i want run service every 10 minutes.

but timer starting run every 10 minutes while service continually running.

either mean way , want start service every 10 minutes, in case use task scheduler start service every 10 minutes, let it's processing, , shut down again.

or let service run continually , timer event fire every 10 minutes.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -