Skip to main content

Infinite loop

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

Creates an infinite loop that continues to execute until it is explicitly broken by a Break loop command or the process is stopped manually. This command is useful for creating continuous processes that need to run indefinitely, such as monitoring systems or background tasks.


Parameter Values

Input parameters

This action does not require any input parameters.

Variables produced

This command would produce a variable that stores the current loop iteration count, starting from 1 by default and incrementing by 1 each time the loop runs.


Using Variables in Conditions

You can use the loop index variable in conditions or other actions by referencing it with the variable syntax (e.g., {loopCount}). This is particularly useful when you need to:

  • Track how many times the loop has executed

  • Create conditional logic based on the number of iterations

  • Log or display the current iteration number


Notes

  • An infinite loop will continue running indefinitely and must be explicitly terminated using a Break loop command or by stopping the automation manually.

  • Always ensure you have a proper exit condition or break mechanism to prevent the automation from running indefinitely when not intended.

  • Consider implementing error handling to manage unexpected situations that might occur during loop execution.

  • The loop index variable can be useful for debugging purposes or for implementing logic that needs to be executed after a specific number of iterations.

Did this answer your question?