Recovery options for Windows Service feature?

Hey guys,

We have some circuit-breaker logic in a Windows Service we’re deploying with Octopus (the service completely stops when NServiceBus shuts down because of a loss of connectivity).

We’d like to configure the service to automatically restart (the outages are usually temporary, or occur overnight). I know this is possible via the sc.exe command using the “failure” option (

One of our devops guys is looking to put together a custom script to enable this, but I really like the convenience and clean interface of the existing Octopus feature (prevent everyone from having to dig through powershell scripts to edit builds!). Are there any plans to add a “Recovery” section to the feature?

Or does anyone know a simple method of enabling this, without completely replacing the feature in the step? I see there’s a section for passing arguments to the service executable, but not to sc.exe itself.


Sorry, I just realized something so obvious has probably been brought up before… annnnnnd of course, a quick search reveals:

Uservoice item:


I’m going to point the devops team to the 2nd item – looking forward to seeing progress on the feature!


Hi Adam,

Glad you were able to find the responses.
Don’t hesitate to get in touch if you have any other issues or questions in the future :slight_smile: