Looping and executing an action at a predetermined time

Someone asked this in DM and I thought it could be of interest to others

“What would you say is the best way to run a layer everyday? Is there a looping function ?”


There are several ways to achieve what I think you want to achieve. :slight_smile:

The easiest way to achieve looping is to use markers in combination with Run on Marker and Go to Marker nodes.
image

image

Another answer to your question: “the best way to run a layer everyday” is that you create 2 layers: Logic layer and DoSomething layer.
image
The logic layer just takes care of , you guessed it, the logic. It could look something like this.


Here I created a boolean Global variable called BetweenTime. It is set to True if system time is between 8 and 14 (2pm). Otherwise it is set to False.

Then, in the DoSomething layer, we do something only if BetweenTime variable is set to True.
image
In the above image, I placed a single Render to Canvas node, but it could be anything else.

I hope this helps, but should you need more info, just ask.
Mitja

1 Like