Looping / Repeating script

Is there a way to call a script x times ? I want to call it from an external source (eg ifttt). If this is not possible, how to internally loop a script based on an external variable passed via Post?

( same question as previously asked here : Looping a script based on a variable? it seems)

You’d probably need to use 2 scripts, and have one of them decrement an input_number. You could then have a condition in one script that when that reached zero, to stop both scripts.

See this cookbook example showing how to loop 2 scripts.

1 Like