Re: scripting dependent services

Subject: Re: scripting dependent services
From: k k <turnleftatnowhere -at- yahoo -dot- com>
To: TECHWR-L <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Sat, 31 Jan 2004 09:13:37 -0800 (PST)


--- bcliver -at- manu -dot- com wrote:
>
> I'm writing some batch scripts kicked off by Windows
> scheduler. The
> scripts launch services, but I need to specify
> dependent services. For
> example, if service B requires service A, then
> service B should not start
> until service A is started.
>
> I can use DELAY=nnnn, but this merely delays
> starting a service. It does
> not ensure that service A has started.
>

You could put an "if" loop in the script that starts
service B. Something like, if service A is running
then start service B, else wait a while and check
again.

I recommend limiting the number of loop iterations.
Set it up so that, say, the third time service A is
found not running, the program terminates and displays
the message that service A hasn't started. If it isn't
starting properly you want some kind of notice so you
can go see what's wrong, rather than have the script
that's supposed to start service B just hang forever.




__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/




References:
scripting dependent services: From: bcliver

Previous by Author: Multiple undo (was Re: Microsoft Documentation)
Next by Author: Re: Multiple undo (was Re: Microsoft Documentation)
Previous by Thread: scripting dependent services
Next by Thread: re Subject: Graphics in lines of text?


What this post helpful? Share it with friends and colleagues:


Sponsored Ads