Retry this loop pass
Runs the current pass of the enclosing loop again from its first step.
Retry this pass
Keyboard Maestro: Cancel (Retry This Loop)
Details #
Goes back to the top of the current pass of the Repeat around it, without moving on to the next item or checking the loop's condition. The loop's item and index variables keep their values. Variables you changed during the pass are not reset.
Use it inside an If so something decides when to stop retrying. Next repeat moves to the next pass; this step repeats the same one.
A pass may be retried at most as many times as the loop's max allows (10,000 by default). Past that the run fails with "retry ran this pass more than N times; check what ends it".
Parameters #
This step takes no parameters.
This step takes no parameters.
Examples #
- Set tries to 0
- Repeat once
- Add 1 to tries
- If tries is below 3
- Retry this pass of the loop
- Show “Pass ran {{ tries }} times” for 2 s
Gotchas #
It only makes sense inside a loop.
In a dry run
retryis simulated, so the pass is not repeated unless you mark the step Safe in dry run.Nothing slows the retry down. Add a Wait pause before it if you are waiting on something outside.
A loop that never stops retrying is cut off by the
maxlimit, not by time.