Expand description
Re-run a command until success (ok) or failure (ko) with cooldown.
§Arguments
cooldown_secsSeconds to sleep between tries.exit_conditionok(stop on success) orko(stop on failure).command...Remainder joined and executed viash -c.
§Usage
try 2 ok cargo test # rerun every 2s until tests pass
try 5 ko curl -f localhost:8080 # rerun until it fails (e.g. service goes down)§Errors
- Cooldown seconds parse fails.
- Exit condition parse fails.
- Spawning or executing command fails.
- UTF-8 conversion for output or error context fails.
Enums§
- Exit
Cond 🔒 - Exit condition for retry loop.
Functions§
- main 🔒
- Re-run a command until success (ok) or failure (ko) with cooldown.