Re: Script to Email Me when a Service has Stopped
- From: "Pegasus \(MVP\)" <I.can@xxxxxxx>
- Date: Wed, 28 Mar 2007 13:38:45 +1000
"James" <James@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:23ED8F90-911A-4590-8456-BA922F369053@xxxxxxxxxxxxxxxx
I have two services one called vmagic.exe and the other csmagic.exe thatwhen
stopped I want an email sent to me to notify me that it has been stopped.Is
it possible to do this? These services reside on both Windows 2000 andwith
Windows 2003 servers. I have no scripting background and am not familiar
the syntax or terminology. I have downloaded a couple of scripts in thepast
that have been preconfigured for certain task and substituted my specificthis
environment info where required in the script but thats as good as it gets
for me. If anyone knows if there are any scripts out there that can do
or if anyone can give me a copy of something they may have created withsome
very simple instructions for a NON SCRIPTOR such as myself that would be
greatly appreciated.
Thanks
You could invoke this script when the service fails:
@echo off
set Sender=support@xxxxxxxxxxx
set Receiver=James@xxxxxxxxxxx
set Host=mail.YourISP.com
set Subject=%date% %time:~0,5%: SomeService is not running
c:\tools\blat.exe "%0" -f %Sender% -to %Receiver% -server %Host% -subject
"%Subject%"
Adjust the four "set" lines to reflect your own environment. Blat.exe
is a command line mailer that you can download from a number of
sites.
.
- Prev by Date: RE: GPO What is going on???
- Next by Date: Re: Scheduled task failing NT Backup Windows server 2003 Small Busines
- Previous by thread: RE: GPO What is going on???
- Next by thread: Re: Script to Email Me when a Service has Stopped
- Index(es):
Relevant Pages
|