TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
--- 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/