Jump to content

A 'Wait' within a timed 'Repeat'


andyf0

Recommended Posts

Posted

I have a program that is not doing exactly what I want.

 

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Repeat Every  16 minutes 
          Set 'DEVICES / OUTLETS / DR (Table Lamp)' On
          Wait  15 minutes  (Random)
          Set 'DEVICES / OUTLETS / DR (Table Lamp)' Off

Else
  - No Actions - (To add one, press 'Action')

 

My question is does the 16 minute counter start at the beginning of the repeat loop or after the last line is executed. The light turns on and off OK but the total length of time between turning it on, turning it off and turning it on again seems way longer than 16 minutes.

 

Edit: My testing would seem to indicate that the 16 minutes starts after the last instruction in the repeat loop is executed.

Posted

Repeat starts the repeat from when it finishes. For example:

 

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Repeat Every  10 seconds
          Wait  10 seconds
          $sTest += 1


 

The above code takes 20 seconds between adding 1 to $sTest.

Posted
Repeat starts the repeat from when it finishes. For example:

 

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Repeat Every  10 seconds
          Wait  10 seconds
          $sTest += 1


 

The above code takes 20 seconds between adding 1 to $sTest.

 

Except for the first time when it will take 10 secs. Although you did say 'between' so technically you're correct. :)

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...