1

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.

2
  • Is it a third party service or something you are developing? If it is a common service, what's its name/purpose? – Jan Doggen Apr 26 '13 at 15:04
  • Is a commercial solution OK? – CoreTech Apr 26 '13 at 18:41
7

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.

Service Control Dialog

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.