Re: need a program to email me when service stops
- From: "Jabez Gan [MVP]" <mingteikg@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 25 Apr 2007 10:38:22 +0800
Hey Gilbert,
Have you tried copying:
--------------
@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%"
--------------
Modify the above and save it as send.bat. does it work? (And make sure that you have blat.exe in the correct directory.
--
Jabez Gan [MVP]
Microsoft MVP: Windows Server
http://www.blizhosting.com
MSBLOG: http://www.msblog.org
"Gilbert" <Gilbert@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:F161CED2-2282-4CC2-89B0-7C036BAEAE3F@xxxxxxxxxxxxxxxx
No, not really, it's a little overkill for what I'm trying to do. I'm just
trying to monitor 1 service on 1 server, nothing else.
I found another person posted something about Blat.exe but it's very
confusing on how to use. It's basically a batch file that you create.
Here's what they said:
"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."
I am confused on how to use it. Should I create a test.bat file with the 4
lines and then run blat.exe ??? I tried that but it didn't work. I also
tried to include all of the lines in 1 batch file but that didn't work
either.
"Chris" wrote:
Maybe something like this?
http://www.programurl.com/servicekeeper.htm
"Gilbert" wrote:
> I have a Windows service that stops every few weeks. I'd like to be > notified
> by e-mail whenever that service stops. If I go to Services.msc and go > to the
> Properties of that service, I have the option of selecting "Run this > program
> on 1st failure".
>
> Basically, all I need is a basic batch file that runs some commands to > send
> me an email. We have an internal Exchange server I can use for SMTP > relay.
>
> I think this should be pretty simple to do.
>
> Any ideas?
.
- Follow-Ups:
- Re: need a program to email me when service stops
- From: Gilbert
- Re: need a program to email me when service stops
- Prev by Date: Re: WSUS client
- Next by Date: RE: NT Backup :KB927073 : Scheduled Backup Fails
- Previous by thread: Re: Diskpart not loading
- Next by thread: Re: need a program to email me when service stops
- Index(es):
Relevant Pages
|
Loading