Block Execution Order


#1

In an “Execute” block, does the order of the following statement blocks matter? I have an “Only When / Every / End Every” block and a “Every Day / End Every” block. Does the order of these two blocks make any difference? (In an event-driven model, I don’t believe it does, but I’d appreciate confirmation).


#2

“EVERY” blocks are kind of like mini-pistons.
When they run, they only execute what is inside that block.


Pro Tip:

When you edit & save this piston, make sure the current time is not:

  • 19-21 past the hour
  • 39-41 past the hour
  • 59, 0 or 1 past any hour.

Otherwise, the “Every 20 minutes” may occasionally align with the 3:00 trigger.
(you do not want this)

For example, right now, yours is potentially close to a double trigger:
pic


#3

So are the “EVERY” blocks like separate threads waiting for some event or trigger to start execution of that block? Am I safe stacking up multiple blocks inside the Execute block?

Thanks for the “Pro Tip” – I didn’t realize the importance of checking the time when I save. What sort of disaster would this cause?


#4

I stack EVERY blocks all the time. Just plan strategically so each block finishes processing completely before another trigger comes in. (IE: Do not use long WAITs)


It depends on the piston. If the 20 min trigger happens near the 3 oclock trigger, there is a chance that they will both run on the same execution.

In this particular case, all your 3 oclock trigger does is a log to console, so you are probably safe.