how to restart the windows service automatically with 5 seconds, if it is stopped manually?

Elanchezhiyan P 100 Reputation points

Hi Team,

I have a windows service that should run on the client's system 24*7 (local server system). If the client tries to stop the service manually, how do I invoke the service within 5-10 seconds? I have already placed the startup type as automatic. But, this feature works only when the system is restarted.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,543 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,180 questions
{count} votes

0 additional answers

Sort by: Most helpful