Launching 6 .vbs scripts simultaneously from a single script 
Author Message
 Launching 6 .vbs scripts simultaneously from a single script

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



Mon, 03 Nov 2003 00:50:17 GMT  
 Launching 6 .vbs scripts simultaneously from a single script
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.  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/

Quote:

> 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



Mon, 03 Nov 2003 00:49:44 GMT  
 Launching 6 .vbs scripts simultaneously from a single script


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

Quote:
>    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).

- Show quoted text -

Quote:
> > thankin all of you in advance



Thu, 06 Nov 2003 10:01:15 GMT  
 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



Fri, 07 Nov 2003 21:19:43 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Launching 6 .vbs scripts simultaneously from a single script

2. launch vbs script from a hta app?

3. Permision Problem launching Excel from VBS Script on W2K

4. How to launch a script without the associated file type for .vbs

5. Permision Problem launching Excel from VBS Script on W2K

6. Launching VBS Script in VB?

7. Running a .vbs script from within a .vbs script

8. Newbie question - calling a VBS script from another VBS script

9. Include another VBS script file in a main VBS script

10. VBA scripts launched from rules stopped working after OL2002 SP2

11. Launching an application from Outlook VB scripts

12. Launching an application from Outlook VB scripts- repost

 

 
Powered by phpBB® Forum Software