Pattern

// self loop
schedule function namespace:CustomLoopFunction 1s

Benefits

Example use cases

Used to run timers or tickers

// count up
scoreboard players add EX$loop.MinutesTicker.minutes Example 1

// end the ticker when it hits 1 hour
execute if score EX$loop.MinutesTicker.minutes Example = 60.. run scoreboard players operation EX$loop.MinutesTicker.isLooping Example = BOOL$true DatapackManager

// self-contained loop
execute if score EX$loop.MinutesTicker.isLooping Example = BOOL$true DatapackManager run schedule function example:MinutesTicker 60s