How to Set up an Email When a Windows Service Fails
We currently have a service that is failing and need to be notified when it does. How to set up the service to send an email when it fails.
It is easy to get a Windows Service to run a program when it fails.
Go to the Services
snap-in, find the service, double click, and go to the Recovery
tab. There you can choose what happens when it fails.
One of the options is Run a Program
. You can write a script or program that sends an email, and simply point this at it. An easy way is to use Windows' wscript
. See link.