#retry #supervisor #parallel #process

app cx

一个简单的命令执行实用工具

1 个不稳定版本

0.1.0 2020年9月19日

#31#supervisor

MIT 许可证

29KB
828

cx 测试 发布

一个简单的命令执行实用工具。

Command eXecutor

USAGE:
    cx <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    help         Prints this message or the help of the given subcommand(s)
    retry        Retry command execution until successful.
    supervise    Supervise command execution.

重试

Retry command execution until successful.

USAGE:
    cx retry [OPTIONS] [COMMAND]...

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --count <count>          maximum number of retry counts
    -i, --interval <interval>    execution interval (sec) [default: 0.1]

ARGS:
    <COMMAND>...    command and options

示例

$ cx retry -c 3 -i 2 -- your command that may fail && echo succeeded || echo failed

监控

Supervise command execution.

USAGE:
    cx supervise [OPTIONS] [COMMAND]...

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --count <count>          re-execution limit counts
    -i, --interval <interval>    execution interval (sec) [default: 0.1]

ARGS:
    <COMMAND>...    command and options

示例

$ cx supervise -c 3 -i 2 -- echo abc

待办事项

  • 功能:并行
  • 构建:armv7-unknown-linux-gnueabihf

依赖

~7MB
~107K SLoC