LinuxCommandLibrary

retry

Repeat command until it succeeds or a criterion is met.

TLDR

Retry a command until it succeeds

$ retry [command]
copy


Retry a command every n seconds until it succeeds
$ retry --delay=[n] [command]
copy


Give up after n attempts
$ retry --times=[n] [command]
copy

Copied to clipboard