How can I force start an Octopus Deploy Tentacle after a server restart?

When patches are applied I typically have to restart my server. There are several instances where the tentacle didn’t start after the server came back online. How can I force the tentacle to start (and always be running)?

A little bit of background. Typically this happens when there is a delay in initializing the .NET CLR after a restart. It is one of those “we’d love to solve it, but we are at the mercy of Windows behavior”

You will want to leverage the Service Watchdog. This command will create a Windows Scheduled Task that will check every so often to ensure the service is still running.

& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" watchdog --create --instances * --interval 10

If you are an Octopus Admin, you can run this command on all tentacles servers by going to Tasks -> Script Console

Selecting the environments you want to run this on.

And entering the script you wish to run.

And then clicking the Run Now button at the top of the screen.