Author |
|
RichardL Senior Member
Joined: December 29 2008 Location: United States
Online Status: Offline Posts: 165
|
Posted: May 24 2009 at 11:57 | IP Logged
|
|
|
I notice that only one VBS can execute at a time.
If I fire a 2nd VBS while the 1st is executing (usually waiting on a PH.Delay), the 2nd will only start when the first one completes.
As a habit I update the Event Log with a "start" and "finish" message as part of every script. So the Event log clearly shows this behavior.
Any reason why this is in place, or any way to allow concurrent execution?
Thank you,
Richard
|
Back to Top |
|
|
jbbtex Senior Member
Joined: February 15 2007 Location: United States
Online Status: Offline Posts: 181
|
Posted: May 24 2009 at 18:11 | IP Logged
|
|
|
Richard,
The way I understand ph.delay is that it stops execution of everything for the amount a time you set.
The only way I know how to do what it appears you want is by using macros and the WAIT command which stops execution of the macro but nothing else.
Have I been as clear as mud?
__________________ Brady
"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." - Gen. George S. Patton
|
Back to Top |
|
|
RichardL Senior Member
Joined: December 29 2008 Location: United States
Online Status: Offline Posts: 165
|
Posted: May 25 2009 at 00:24 | IP Logged
|
|
|
Thanks for the reply - "clear as mud" - sounds simple, "everything waits". Unfortunately for this application that will be a problem.
If anyone else can also confirm that PH.Delay stops everything - that would be good. Alternatively, is there some way to pause a single VBS not using PH.Delay?
I am also experimenting with PH.CreateTimedEvent, which is being finicky, I will start another thread on that one.
Thanks,
Richard
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 25 2009 at 11:54 | IP Logged
|
|
|
Richard,
At this time, PowerHome does not support parallel execution threads. While we are looking at ways to provide multiple execution, certain commands and actions will always be single-threaded (controller communication for example).
The ph.delay (WSH function), ph_delay (PH function), and the macro command "Delay" all suspend execution until the delay is expired. The macro "Wait" command however will suspend the execution of the current macro and allow other processes to execute while waiting.
This doesnt really help you out in VBS however unless you restructure your code to something like this using a macro:
10 ph_runscript_0(5,"c:\program files\powerhome\main.vbs","script1")
20 Wait 60
30 ph_runscript_0(5,"c:\program files\powerhome\main.vbs","script2")
Dave.
|
Back to Top |
|
|