Don't stop a windows service until ....

  • Thread starter Thread starter ucasesoftware
  • Start date Start date
U

ucasesoftware

i do some job in timerBaseInternet.Elapsed

but i don't want to stop the service until this job is finished...

What can i do for this ?

and i can't use canStop to false cause it's only when service is not
running...

any idea ?
 
Hi,

not very sure what you mean

IF you use a timer and you want to stop the timer while processing you can
do so by disabling the timer while you do the procesing.

Is this what you want?


cheers,
 
thx for help but no

in my .Elapsed i update a database

When the users exit my software... they close the Windows Service...

But if they do when i update my database i have a serious problem...

so i need to wait that the update is finished to close my windows
service

understand ?
 
This doesn't sound right. A Windows Service is an application that starts
with the operating system, even when no user is logged on. Yet you are saying
that when users "exit your software" they close the Windows Service....
Could you be more specific?
Peter
 
my windows service update a database : local msde => sqlserver internet

so when nothing is doing in the software... the service have no job...
so i stop it...

but if the service is stopping when my database is update... i could
have some errors...
 
Back
Top