PHPackages                             benmorel/parallel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. benmorel/parallel

AbandonedArchivedLibrary[CLI &amp; Console](/categories/cli)

benmorel/parallel
=================

Command-line script to run commands in parallel at a fixed rate

0.1.3(4y ago)317MITPHP

Since May 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/BenMorel/parallel)[ Packagist](https://packagist.org/packages/benmorel/parallel)[ GitHub Sponsors](https://github.com/BenMorel)[ RSS](/packages/benmorel-parallel/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Note

This repository has been archived. Please refer to [benmorel/every](https://github.com/benmorel/every) as a replacement candidate.

Parallel
========

[](#parallel)

A command-line script to run commands in parallel at a fixed rate.

[![Latest Stable Version](https://camo.githubusercontent.com/231b44a2fdba352d29e8525ae3adbc254c58156e345d2effccc6f3b080fdb2b9/68747470733a2f2f706f7365722e707567782e6f72672f62656e6d6f72656c2f706172616c6c656c2f762f737461626c65)](https://packagist.org/packages/benmorel/parallel)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](http://opensource.org/licenses/MIT)

What is it?
-----------

[](#what-is-it)

Ever needed to execute a command `n` times per second, allowing these commands to run simultaneously if the first command has not finished executing when the second is started? This tool does just that.

As a safeguard, you must specify the maximum number of processes allowed to run simultaneously. If the commands take too long to execute, and the maximum number of processes is reached, the next execution(s) will be skipped until a slot becomes available.

When is it useful?
------------------

[](#when-is-it-useful)

Let's say you have a script that queries a remote API. Your request limit on this API is 5 requests per second.

You can't just keep 5 instances of the script running in parallel:

- if the API response time is lower than 1s, you would need to pause each script to ensure that it lasts at least 1s
- if the API response time is greater than 1s, you would not fully use your request allowance

Parallel.phar can start 5 instances of your script every second, regardless of how many are already running, *up to a limit specified by you*. This limit is necessary to avoid server &amp; network congestion in case of sudden network issue, slowdown or lock.

How to use it?
--------------

[](#how-to-use-it)

Ensure that you have PHP installed, and download [parallel.phar](https://raw.githubusercontent.com/BenMorel/parallel/0.1.3/bin/parallel.phar):

```
wget https://raw.githubusercontent.com/BenMorel/parallel/0.1.3/bin/parallel.phar
chmod +x parallel.phar

```

Alternatively, you can install it with Composer.

Then run:

```
./parallel.phar Rate Concurrency Command [...]

```

Where:

- `Rate` is the number of executions per second
- `Concurrency` is the maximum number of concurrent processes
- `Command` is the command to execute, with its optional arguments

Example:

```
./parallel.phar 10 20 date "+%X %N"

```

This would output 10 lines per second, such as:

```
04:27:12 PM 031273903
04:27:12 PM 121497348
04:27:12 PM 221800224
04:27:12 PM 322584008
04:27:12 PM 423034796
...

```

In this example, there cannot be more than 20 processes running in parallel; this is irrelevant for our `date` example as the execution is really fast, but would be important for long-running scripts, potentially invoking a remote API.

To stop, just press Ctrl + C.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~588 days

Total

4

Last Release

1565d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/57189121968030f0770811b461cc92f9c19c08f5c4767292f2ede48b7277cfad?d=identicon)[BenMorel](/maintainers/BenMorel)

---

Top Contributors

[![BenMorel](https://avatars.githubusercontent.com/u/1952838?v=4)](https://github.com/BenMorel "BenMorel (28 commits)")

### Embed Badge

![Health badge](/badges/benmorel-parallel/health.svg)

```
[![Health](https://phpackages.com/badges/benmorel-parallel/health.svg)](https://phpackages.com/packages/benmorel-parallel)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[illuminate/console

The Illuminate Console package.

13045.3M6.3k](/packages/illuminate-console)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[crunzphp/crunz

Schedule your tasks right from the code.

2342.3M7](/packages/crunzphp-crunz)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54642.4k4](/packages/jolicode-castor)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.9k16.6k](/packages/crazywhalecc-static-php-cli)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
