table of contents
RETRY(1) | User Commands | RETRY(1) |
NAME¶
retry - Repeat command until a criteria is met, usually success.
SYNOPSIS¶
retry [-v] [-h] [-u until] [-w while] command ...
DESCRIPTION¶
The tool repeats the given command until the command is successful,backing off with a configurable delay between each attempt.
Retry captures stdin into memory as the data is passed to the repeated command, and this captured stdin is then replayed should the command be repeated. This makes it possible to embed the retry tool into shell pipelines.
Retry captures stdout into memory, and if the command was successful stdout is passed on to stdout as normal, while if the command was repeated stdout is passed to stderr instead. This ensures that output is passed to stdout once and once only.
- -d seconds, --delay=seconds
- The number of seconds to back off after each attempt.
- -m message, --message=message A message to include in the notification
- when repeat has backed off. Defaults to the command name.
- -t times, --times=times
- The number of times to retry the command. By default we try forever.
- -u criteria, --until=criteria Keep repeating the command until any one
- of the comma separated criteria is met. Options include 'success', 'true', 'fail', 'false', an integer or a range of integers. Default is 'success'.
- -w criteria, --while=criteria Keep repeating the command while any one
- of the comma separated criteria is met. Options include 'success', 'true', 'fail', 'false', an integer or a range of integers.
- -h, --help
- Display this help message.
- -v, --version
- Display the version number.
SEE ALSO¶
The full documentation for retry is maintained as a Texinfo manual. If the info and retry programs are properly installed at your site, the command
- info retry
should give you access to the complete manual.
January 2020 | retry 1.0.1 |