Repeating Events
Within blueprints, it is possible to schedule events to run at specified time intervals. The minimum frequency of these events may vary depending on the license, with the potential to run as frequently as every second.
The repeating event block
A repeating event in RUAL functions similarly to the setInterval() function in JavaScript or crontab> in Linux. However, in this case, you specify a starting date. When the block is executed, it evaluates the input pin Next Run
and utilizes its output to create a new event in the queue.
You can monitor the currently scheduled repeating events in the queue overview within the cluster. The system checks whether the repeating event is still active when the associated blueprint is activated or deactivated.
The execution of the repeating event's flow occurs at the specified time, taking into account the maximum concurrent queue limit imposed by your license. If you have more queue items running simultaneously, they will automatically be postponed. Additional information about auto-postpone can be found for reference.
Event not executing
There may be instances where it appears that the repeating event is not being executed. This could be due to its rapid execution, causing it to seem as if it has already occurred. Additionally, forgetting to activate the blueprint after creating the event can lead to this issue. It is also crucial to ensure that the Next Run
input pin is properly filled, as failure to meet the specified date and time requirements could result in the event being canceled by the system.
Requirements
For a repeating event to function as expected, the following requirements must be met. Additionally, it's important to note that a queue item will cease execution once it reaches the maximum Execution Time
specified within the license.
- The
Start At
pin must be populated and set to a future date and time. - The
Next Run
pin must be populated and set to a future date and time. - The value of the
Next Run
pin must be equal to or greater than theLowest Queue
time specified in the license.
How to Create a Repeating Event
To create a repeating event, either open a new Blueprint or access an existing one, then right-click on the canvas. Select the Add New Block
option, which will display a flow dialog. In this dialog, search for repeating event
and select the blue block labeled with the main group events
. Once the repeating event block is created, it presents two in-pins: Start At
for the initial date and Next Run
for subsequent events. Right-click and drag from the Start At
pin to add the current date now block, which is commonly used as the starting date, though you can specify a future date if needed.
For the Next Run
pin, start by right-click dragging from the date pin and dropping it elsewhere on the canvas. Then, disconnect and left-click drag from the date now
block to open a dialog where you can search for operations like plus seconds
within the date group. Connect the Seconds
in-pin to the custom number block and set it to 60
. Upon deploying and activating the blueprint, a queue item for this repeating event is created, and it will execute every 60
seconds.