PHPackages                             geopal-solutions/gnu-parallel-wrapper - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. geopal-solutions/gnu-parallel-wrapper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

geopal-solutions/gnu-parallel-wrapper
=====================================

A wrapper library for the GNU Parallel binary

43.0k2[1 issues](https://github.com/geopal-solutions/gnu-parallel-wrapper/issues)PHP

Since Feb 27Pushed 12y ago1 watchersCompare

[ Source](https://github.com/geopal-solutions/gnu-parallel-wrapper)[ Packagist](https://packagist.org/packages/geopal-solutions/gnu-parallel-wrapper)[ RSS](/packages/geopal-solutions-gnu-parallel-wrapper/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (3)Used By (0)

gnu-parallel-wrapper
====================

[](#gnu-parallel-wrapper)

Simple PHP wrapper class for the GNU Parallel tool. Allows for running single threaded tasks in parallel on one or multiple machines, from within PHP.

### This package requires GNU Parallel to be installed beforehand!

[](#this-package-requires-gnu-parallel-to-be-installed-beforehand)

In case you do not have Parallel on the machine you are running your PHP script on, an InvalidBinaryException will be thrown. (See examples.)

### Example 1

[](#example-1)

```
/**
 *
 * Running commands on the local host
 *
 */

use Parallel\Exceptions\InvalidBinaryException;
use Parallel\Wrapper;

// You can initialize the Wrapper with or without parameters
$parallel = new Wrapper();

try {
    // Set path to binary
    $parallel->initBinary('/path/to/parallel/binary');

    // Add the commands you want to run in parallel
    $parallel->addCommand('/path/to/command/one.sh');
    $parallel->addCommand('/path/to/command/two.sh');
    $parallel->addCommand('/path/to/command/three.sh');

    /**
     * Setting the parallelism to 0 or "auto" will
     * result in a parallelism setting equal to the
     * number of commands you whish to run
     *
     * Use the maxParallelism setting to set a cap
     */
    $parallel->setParallelism('auto');
    $parallel->setMaxParallelism(10);

    // Run the commands and catch the output from the console
    $output = $parallel->run();
} catch (InvalidBinaryException $exception) {
    // The binary file does not exist, or is not executable
}
```

### Example 2

[](#example-2)

```
/**
 *
 * Running commands on multiple hosts
 *
 */

use Parallel\Exceptions\InvalidBinaryException;
use Parallel\Wrapper;

$commands = array(
    '/path/to/command/one.sh',
    '/path/to/command/two.sh',
    '/path/to/command/three.sh'
);

$maxParallelism = 10;

// You can initialize the Wrapper with or without parameters
$parallel = new Wrapper('/path/to/parallel/binary', $commands, $maxParallelism);

try {
    /**
     * You can still set the parallelism manually, or leave it
     * to the wrapper to calculate it
     */
    $parallel->setParallelism(8);

    $parallel->addServer('foo@example1.com');
    $parallel->addServer('bar@example2.com');
    $parallel->addServer('baz@example3.com');

    /**
     * By default, the local host is also included
     * in the list of servers used for execution.
     *
     * You can exclude it from the list by setting
     * the remoteOnly flag to true
     */
    $parallel->useRemoteOnly(true);

    // Run the commands and catch the output from the console
    $output = $parallel->run();
} catch (InvalidBinaryException $exception) {
    // The binary file does not exist, or is not executable
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/14b9ad61eb3ccc33806f80df4d07c054bef68149235335dd40893dffa923df6e?d=identicon)[geopal-solutions](/maintainers/geopal-solutions)

---

Top Contributors

[![gaborzelei](https://avatars.githubusercontent.com/u/6368183?v=4)](https://github.com/gaborzelei "gaborzelei (12 commits)")[![geopal-solutions](https://avatars.githubusercontent.com/u/3493628?v=4)](https://github.com/geopal-solutions "geopal-solutions (8 commits)")

### Embed Badge

![Health badge](/badges/geopal-solutions-gnu-parallel-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/geopal-solutions-gnu-parallel-wrapper/health.svg)](https://phpackages.com/packages/geopal-solutions-gnu-parallel-wrapper)
```

###  Alternatives

[onmotion/yii2-telegram

Support chat for site based on Telegram bot

526.3k](/packages/onmotion-yii2-telegram)

PHPackages © 2026

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