Windows services Recovery not restarting service

hi there, as described in the title I have problems getting my service to recover on failure. It does not matter how I set up “sc failure” - nothing happens.
My service app reaches App.UnhandledException, there I write to a log file, nothing more.
But windows does not trigger any of the recovery actions.

Do you have any ideas ?

My sc failure:
sc failure MySvc reset= 60 actions= restart/120000/restart/300000/restart/900000

Thank you in advance
Tom

I tend to use the following format:

sc failure MySvc restart/120000/restart/300000// reset= 60

Hey, thank you for your input.
Finally I found another post, which solves this.

For the interested readers :

So in short, set sc failureflag MySvc 1
and use Quit(2) in your code.

Greetings
T

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.