retryCommand


NameretryCommand JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://gitee.com/kuankuan2007/retry-command
SummaryIt 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.
upload_time2023-11-19 16:28:59
maintainer
docs_urlNone
authorkuankuan
requires_python
licenseMulan PSL v2
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```bash
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:

```bash
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:

```bash
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:

```bash
do-retry -m 3 -i 2 -t 5 -c <command>
```

## License

Retry Command is licensed under the MulanPSL-2.0 License. See the [LICENSE](LICENSE) file for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitee.com/kuankuan2007/retry-command",
    "name": "retryCommand",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "kuankuan",
    "author_email": "2163826131@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/09/76/8d698cc80ab18cd8b150394d69be60b721ea4ecb93f4b9e35c1328bd92ba/retryCommand-0.0.2.tar.gz",
    "platform": "windows",
    "description": "# Retry Command\r\n\r\n## Introduction\r\n\r\nRetry 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.\r\n\r\n## Installation\r\n\r\nTo use Retry Command, you need to have Python installed on your system. You can install the library using pip:\r\n\r\n```bash\r\npip install retryCommand\r\n```\r\n\r\n## Usage\r\n\r\nRetry Command can only be used as a standalone script\r\n\r\n### Standalone Script\r\n\r\nTo use Retry Command as a standalone script, you can run the following command:\r\n\r\n```bash\r\ndo-retry [options] -c <command>\r\n```\r\n\r\nReplace `<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.\r\n\r\n## Options\r\n\r\nRetry Command provides several options to customize the behavior of retries:\r\n\r\n- `-s, --no-stop-after-success`: Do not stop retrying after the command succeeds.\r\n- `-p, --no-ignore-process-error`: Do not stop retrying after encountering a process error.\r\n- `-m, --max-num-of-retry`: Maximum number of retries. Set to -1 for unlimited retries.\r\n- `-i, --interval`: Interval between retries in seconds.\r\n- `-t, --time-out`: Timeout for each execution in seconds. Set to -1 for no timeout.\r\n- `-d, --cwd`: Current working directory for the command.\r\n- `-n, --success-return-code`: Return codes that indicate success. Multiple values can be specified.\r\n- `-q --quite`: mute more output.\r\n- `--mute`: mute all output.\r\n- `-l, --no-need-to-log`: Does not output any records outside of stdou. It only works when mute is on.\r\n- `-c, --command`: Command to execute.\r\n\r\n## Examples\r\n\r\nHere are some examples of how to use Retry Command:\r\n\r\n- Retry executing a command until it succeeds, ignoring process errors:\r\n\r\n```bash\r\ndo-retry -c <command>\r\n```\r\n\r\n- Retry executing a command with a maximum of 3 retries, an interval of 2 seconds, and a timeout of 5 seconds:\r\n\r\n```bash\r\ndo-retry -m 3 -i 2 -t 5 -c <command>\r\n```\r\n\r\n## License\r\n\r\nRetry Command is licensed under the MulanPSL-2.0 License. See the [LICENSE](LICENSE) file for more information.\r\n",
    "bugtrack_url": null,
    "license": "Mulan PSL v2",
    "summary": "It 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.",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://gitee.com/kuankuan2007/retry-command"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9cdb1b1ba1a648963f9cd690a578c72d87bf60a9982c174bb50e59890de433d4",
                "md5": "b784ea9a4f74fd86b7979661d09b1ef7",
                "sha256": "323636f6332efae442517cd0dc8325bfc82cf958044bbe4522f7bf830e9a9307"
            },
            "downloads": -1,
            "filename": "retryCommand-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b784ea9a4f74fd86b7979661d09b1ef7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8536,
            "upload_time": "2023-11-19T16:28:58",
            "upload_time_iso_8601": "2023-11-19T16:28:58.160394Z",
            "url": "https://files.pythonhosted.org/packages/9c/db/1b1ba1a648963f9cd690a578c72d87bf60a9982c174bb50e59890de433d4/retryCommand-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "09768d698cc80ab18cd8b150394d69be60b721ea4ecb93f4b9e35c1328bd92ba",
                "md5": "2e6913ff0971f086334f47e66b13eecc",
                "sha256": "60ee61028334f23ab05f71de83c496ae6047ac884ebb205af49639d233e95527"
            },
            "downloads": -1,
            "filename": "retryCommand-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2e6913ff0971f086334f47e66b13eecc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8085,
            "upload_time": "2023-11-19T16:28:59",
            "upload_time_iso_8601": "2023-11-19T16:28:59.619882Z",
            "url": "https://files.pythonhosted.org/packages/09/76/8d698cc80ab18cd8b150394d69be60b721ea4ecb93f4b9e35c1328bd92ba/retryCommand-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-19 16:28:59",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "retrycommand"
}
        
Elapsed time: 1.19573s