Re: [NTISP] restarting stopped services

Dale E. Reed Jr. ( (no email) )
Sat, 06 Mar 1999 12:42:23 -0800

Danny Sinang wrote:
>
> i have a service running on my nt4 server that keeps on dying because of
> some weird application error.
>
> so i plan to write a script to check every 30 minutes if the service is
> running and it isn't, then restart it.
>
> can anyone tell me what script commands will enable me to do these ?

You can get slepp.exe from our FTP site and use a script like this:

:top
net start service1
net start service2
sleep 600
goto top

then you can run the script with srvany or just in the foreground. If
the
service is running, the "net start" will just return that (otherwise it
will
start the sevice).

-- 

Dale E. Reed Jr. Emerald and RadiusNT__________________________________________IEA Software, Inc. www.iea-software.com

For more information about this list, including removal,see this url: http://www.iea-software.com/maillist.html