Skip to content

The missing command line tool to execute the same command N times.

License

Notifications You must be signed in to change notification settings

martinezdelariva/retry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

retry

Build Status

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

Install

Use executable (recommended)

Download at releases

Homebrew (macOS)

To add the tap and install in one command:

brew install martinezdelariva/retry/retry

Compile on your own
  1. Download or clone the repo.
  2. Build executable make build

Executable is placed at bin/retry

Usage

$ 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.

TODO

  • Exponential back off between execution.
  • Stop execution of first success.

About

The missing command line tool to execute the same command N times.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published