Skip to main content

forever

Runs the body indefinitely. The body must yield periodically so the server can continue processing.

Syntax

forever with $iter

Example

# A forever loop must yield so the server can continue processing.
forever
wait 1m
Print "One minute has passed."
end

# The optional binding contains the 1-based iteration number.
forever with $iter
wait 1s
Print "current iteration: {$iter}"
end

# Use break to leave the loop or continue to skip to its next iteration.