The missing command line tool to execute the same command several times.
$ retry --max 4 curl --head --url https://www.google.com
RealTime SystemTime UserTime Success Error
1 179.184ms 11.438ms 29.477ms true
2 170.156ms 9.122ms 28.621ms true
3 170.78ms 8.465ms 27.948ms true
4 166.297ms 8.264ms 24.533ms true
Download at releases
To add the tap and install in one command:
brew install martinezdelariva/retry/retry
- Download or clone the repo.
- Build executable
make build
Executable is placed at bin/retry
$ retry [options] <command> [args...]
Options:
--max 1
: maximum number of command execution.--sleep 2s
: sleep time between single execution.--timeout 15s
: limits the time duration of total retries.--concurrency 1
: maximum number of concurrent executions.
Type retry --help
for a complete description and default values.
- Exponential back off between execution.
- Stop execution of first success.