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

Elanchezhiyan P 100 Reputation points
2023-03-08T06:13:19.3166667+00:00

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 for business | Windows Client for IT Pros | User experience | Other
Developer technologies | C#
{count} votes

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.