0

I'm using a simple windows service app. Some of the code takes around a minute to finish executing. If I want to rollout news changes to production, how do I ensure that even after I stopped the service, the service finished what ever it's executing?

pfx
  • 15,218
  • 41
  • 36
  • 52
user3587180
  • 1,241
  • 9
  • 19

1 Answers1

1

Your new service would need to check to make sure the old process isn't running.

How can I verify if a Windows Service is running

A better way would be to fix your service so it can be shutdown in a reasonable length of time. A minute is much too long to stop a service.

Whatever it's doing needs to be able to cleanly stop or roll back on request.

Terry Carmen
  • 3,515
  • 1
  • 13
  • 30