
Launching 6 .vbs scripts simultaneously from a single script
I think I addressed that eventuality, at least in an implied manner,
when I offered that there were TWO reasons that his script wasn't
working the way he wanted it to work. One was that the Run wasn't being
setup correctly or that the first script was NOT pausing, but rather it
was using all available CPU cycles. WSH scripts tend to do that, which
I assume is why the Sleep method was added in version 2.
Therefore, it would seem to me that additional efficiency is possible
ONLY if the former case (bWaitForReturn = True, instead of False) is
true. If any script is using (very nearly) all of the CPU cycles, the
addition of (supposed) parallel processes will have negligible (or even
negative) impact on the efficiency of the overall process. If there had
been a pause in 'GUNAs' script AND the bWaitForReturn was False or not
defined, then he wouldn't be reporting the scripts wouldn't run
concurrently, would he?
Tom Lavedas
-----------
http://www.pressroom.com/~tglbatch/
Quote:
> > You must either be setting the Run method's bWaitforReturn variable to
> > True or the a.vbs script is using all available CPU time. Otherwise, it
> > should be possible to get the six scripts to run concurrently.
> > If you are hoping to get the jobs allocated to the six scripts done
> > sooner by running them simultaneously, you are probably wasting your
> > time. The CPU only has so many clock cycles available.
> But if some of the scripts spend their some of their clock cycles awaiting
> the completion of other events (i.e. for a remote server to honour a
> request), then running them concurrently might indeed be a good idea.
> /Al
> > If one script
> > is using them all, the other scripts just have to wait their turn.
> > There is no way to set individual timeslice parameters on scripts,
> > AFAIK. And even if their were a way, the overall duration of each
> > script would be stretched out in inverse proportion to their priority,
> > thus defeating the purpose.
> > Tom Lavedas
> > -----------
> > http://www.pressroom.com/~tglbatch/
> > > dear list
> > > How would I launch say 6 .vbs scripts simultaneously from my single
> > > vbs script . the problem with running through the wscript.run
> > > command is that it launches sequentially and I don't want that. I
> > > 've tried launching the scripts(vbs) simultaneously from Nt
> > > scheduler and it works fine. But the problem with this solution is
> > > that i have to run it from a single script because there are other
> > > "things" that i need to do once i have completed the running of the
> > > 6 scripts. It looks like the process is synchronous process....or
> > > that is what it looks like (plz do correct me if i'm wrong here),
> > > meaning when I launch a.vbs from my guna.vbs It waits until a.vbs
> > > has completed executing, before I can launch b.vbs(and sometimes
> > > a.vbs takes 20 minutes to excute a job).
> > > basically i'm just trying to run 6 vbs scripts at exactly the same
> > > time and not wait for 1 to complete before launching the next script > >
> (Asynchronous process).
> > > thankin all of you in advance