Retry Command
Introduction
Retry Command is a Python library that allows you to retry executing a command multiple times until it succeeds or reaches the maximum number of retries. It provides options to customize the behavior of retries, such as setting a timeout for each execution and specifying the return codes that indicate success.
Installation
To use Retry Command, you need to have Python installed on your system. You can install the library using pip:
pip install retryCommand
Usage
Retry Command can only be used as a standalone script
Standalone Script
To use Retry Command as a standalone script, you can run the following command:
do-retry [options] -c <command>
Replace <command> with the command you want to execute. You can also specify various options to customize the behavior of retries. Use the -h or --help option to see the available options and their descriptions.
Options
Retry Command provides several options to customize the behavior of retries:
-s, --no-stop-after-success: Do not stop retrying after the command succeeds.-p, --no-ignore-process-error: Do not stop retrying after encountering a process error.-m, --max-num-of-retry: Maximum number of retries. Set to -1 for unlimited retries.-i, --interval: Interval between retries in seconds.-t, --time-out: Timeout for each execution in seconds. Set to -1 for no timeout.-d, --cwd: Current working directory for the command.-n, --success-return-code: Return codes that indicate success. Multiple values can be specified.-q --quite: mute more output.--mute: mute all output.-l, --no-need-to-log: Does not output any records outside of stdou. It only works when mute is on.-c, --command: Command to execute.
Examples
Here are some examples of how to use Retry Command:
- Retry executing a command until it succeeds, ignoring process errors:
do-retry -c <command>
- Retry executing a command with a maximum of 3 retries, an interval of 2 seconds, and a timeout of 5 seconds:
do-retry -m 3 -i 2 -t 5 -c <command>
License
Retry Command is licensed under the MulanPSL-2.0 License. See the LICENSE file for more information.
Metadata
Release files for retryCommand 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| retrycommand-0.1.0.tar.gz | 8.4 kB | With provenance | Details for retrycommand-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| retrycommand-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for retrycommand-0.1.0-py3-none-any.whl |
Total release size: 17.6 kB
Release files / retrycommand-0.1.0.tar.gz
| Download URL | retrycommand-0.1.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0f886231023ea8c0d53fe63e8827a5dfbb34f37708f65d33ad1d4aec9ddfaa8
|
|
BLAKE2b-256 checksum How to use checksums |
9213d236a0c380aae40c25c86b0167178f1a6b2016cea8f64dbb5c5e98636faf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2025.
Transparency logRelease files / retrycommand-0.1.0-py3-none-any.whl
| Download URL | retrycommand-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90a3d17ab45afe1b67ab4d9be18199cc966e1be3cbb6c4c421ee46ddca420e57
|
|
BLAKE2b-256 checksum How to use checksums |
b22a9608eb28db4497dc680949b05e2020e0f4356ff7a652b14c47dc534e7c59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2025.
Transparency logSecurity for retryCommand 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for retrycommand-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.