Monday, April 20, 2015

Automatically restart Windows service if it is not running

I have a windows service running on a Windows 2003 server. Under the properties option when you right click the service, there is an option to restart the service if it fails. The options available are for the first, second and any subsequent failures.




I tried to use this option to restart the service when not running but it looks like it only restarts the service if the service fails as a result of a failure. The problem i have is that if there is a failure, the service picks this up and shuts down the service 'gracefully'. This means it is not being restarted.



Is there a way i can restart the service regardless of whether it stopped because of a failure or if it stopped gracefullly?



Thanks

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...