Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Sequential Execution Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
RichardL
Senior Member
Senior Member


Joined: December 29 2008
Location: United States
Online Status: Offline
Posts: 165
Posted: May 24 2009 at 11:57 | IP Logged Quote RichardL

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 View RichardL's Profile Search for other posts by RichardL
 
jbbtex
Senior Member
Senior Member


Joined: February 15 2007
Location: United States
Online Status: Offline
Posts: 181
Posted: May 24 2009 at 18:11 | IP Logged Quote jbbtex

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 View jbbtex's Profile Search for other posts by jbbtex
 
RichardL
Senior Member
Senior Member


Joined: December 29 2008
Location: United States
Online Status: Offline
Posts: 165
Posted: May 25 2009 at 00:24 | IP Logged Quote RichardL

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 View RichardL's Profile Search for other posts by RichardL
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 25 2009 at 11:54 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum