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
  • 10,612
  • 39
  • 29
  • 43
user3587180
  • 1,171
  • 8
  • 18

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,328
  • 1
  • 12
  • 26