Skip to content

EgorEmeliyanov/Run-Retriable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Retriable in PowerShell

This is loosely inspired by https://github.com/kamui/retriable but much simpler (yet handy!). Implements configurable retries (normally you would want exponential backoff) and a list of "fatal" error codes that are immediately terminating (if used with WebRequest-like stuff such as Invoke-WebRequest or Invoke-RestMethod).

Usage

$result = Run-Retriable -Command {
    # something that may fail or be throttled
    # e.g.: Invoke-RestMethod -Uri "https://api.ipify.org?format=json"      
}

About

Retry failed code with kinda exponential backoff

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published