command-pool

Crates.iocommand-pool
lib.rscommand-pool
version0.0.2
created_at2025-08-06 17:16:14.923769+00
updated_at2025-08-06 17:33:17.990464+00
descriptionA powerful and intuitive command-line tool to execute a series of commands in parallel.
homepagehttps://github.com/worktools/command-pool
repositoryhttps://github.com/worktools/command-pool
max_upload_size
id1784076
size28,491
题叶 (tiye)

documentation

https://docs.rs/command-pool

README

command-pool

command-pool is a command-line tool for running a command multiple times in parallel.

Features

  • Concurrent Execution: Run multiple instances of a command simultaneously.
  • Concurrency Control: Control the number of concurrent tasks with the -c or --concurrency flag.
  • Task Limit: Specify the total number of tasks to run with the -n or --total-tasks flag.
  • Task Timeout: Set a timeout for each task in seconds with the --timeout option.
  • Stop on Failure: Stop spawning new tasks if one fails with the --stop-on-fail flag.
  • Quiet Mode: Suppress stdout from the executed commands.
  • Launch Delay: Configure a delay between the initial task launches.
  • Summary Report: A summary is provided after execution with statistics on task completion and duration.

Usage

command-pool [OPTIONS] -- <COMMAND> [ARGS]...

Examples

1. Basic Usage

Run a simple shell command 10 times with a concurrency of 4:

command-pool -c 4 -n 10 -- bash -c "echo 'Hello from task' && sleep 1"

2. Using a Script

Execute a shell script multiple times.

command-pool -c 2 -n 5 -- bash demos/random_sleep.sh

3. With Timeout

Run tasks with a 2-second timeout.

command-pool -c 3 -n 10 --timeout 2 -- bash demos/random_sleep.sh

License

This project is licensed under the MIT License.

Commit count: 0

cargo fmt