Giter VIP home page Giter VIP logo

retry-cli's Introduction

retry (cli)

Summary

A small command line application that assists in retrying failed commands.

retry is a command line tool written in Rust intended to automatically re-run failed commands with a user configurable delay between tries.

Usage

Usage: retry [OPTIONS] <COMMAND>...

Arguments:
  <COMMAND>...


Options:
      --attempts <ATTEMPTS>
          [default: 3]

      --min-duration <MIN_DURATION>
          minimum duration

          Examples: `10ms`, `2s`, `5m 30s`, or `1h10m`

          [default: 10ms]

      --max-duration <MAX_DURATION>
          maximum duration

          Examples: `10ms`, `2s`, `5m 30s`, or `1h10m`

      --jitter <JITTER>
          amount of randomization to add to the backoff

          [default: 0.3]

      --factor <FACTOR>
          backoff factor

          [default: 2]

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Installation

$ cargo install retry-cli

Examples

Working successfully:

$ retry echo hi
hi
$

The command fails to execute

$ retry cmd-does-not-exist
Error: "unable to execute: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }"
$

The command executes, but fails

$ retry false
failed, retrying...
failed, retrying...
Error: "continued to fail after 3 attempts"
$

retry-cli's People

Contributors

demoray avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jniltinho

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.