开发者

What is the easiest way to implement a self restarting service

I have got a windows service written in .NET and I need to be a开发者_Python百科ble to implement a self-restarting feature for it.

E.g. service constantly monitors the environment in runs in and once a value of the environmental variable reaches its threashold value the service must restart itself.

What would be the easiest way to do it?


Have your app monitor the environment variable, and exit when it should, set the service to restart under the recovery tab for the service. You can do this programmatically if you use code to install the service.


Write a Service to start the Service!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜