PHPackages                             gravitymedia/commander - 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. gravitymedia/commander

AbandonedArchivedLibrary

gravitymedia/commander
======================

Commander is a task manager/runner application for PHP.

1.0.1(9y ago)0194MITPHPPHP &gt;=5.6

Since Aug 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/GravityMedia/Commander)[ Packagist](https://packagist.org/packages/gravitymedia/commander)[ RSS](/packages/gravitymedia-commander/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (9)Versions (3)Used By (0)

Commander
=========

[](#commander)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6e0528b1d3a5c9422df4fcf3e1fd71f334961eb09620e3589225af7b3139ea79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f677261766974796d656469612f636f6d6d616e6465722e737667)](https://packagist.org/packages/gravitymedia/commander)[![Software License](https://camo.githubusercontent.com/4a918579cc710a80dbf8fd2352856550c7bcec28c6081ab43dbb4882f1adf455/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f677261766974796d656469612f636f6d6d616e6465722e737667)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/487803afac8b4dfbfbc7a96c4d9f765e20e35c964472adadd9095c5bf5df6647/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f477261766974794d656469612f436f6d6d616e6465722e737667)](https://travis-ci.org/GravityMedia/Commander)[![Coverage Status](https://camo.githubusercontent.com/3c14ca60dbd1afb93a3c6858095902d771048c25e52acb2c59f98d14f13b1ff0/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f477261766974794d656469612f436f6d6d616e6465722e737667)](https://scrutinizer-ci.com/g/GravityMedia/Commander/code-structure)[![Quality Score](https://camo.githubusercontent.com/a6125019aec48a2ce617aea7851ef91aa973b16ce6e82be22b4583e563452e40/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f477261766974794d656469612f436f6d6d616e6465722e737667)](https://scrutinizer-ci.com/g/GravityMedia/Commander)[![Total Downloads](https://camo.githubusercontent.com/5c2cfb09cee5a7ff84460792f9352504f5fbc4d9360e331237cfb5740eacaee7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f677261766974796d656469612f636f6d6d616e6465722e737667)](https://packagist.org/packages/gravitymedia/commander)[![Dependency Status](https://camo.githubusercontent.com/79f0cec48fcf6a1936c55dc2bf8f98a47a6ec85826c24982210fd094edd744e9/68747470733a2f2f696d672e736869656c64732e696f2f76657273696f6e6579652f642f7068702f677261766974796d656469613a636f6d6d616e6465722e737667)](https://www.versioneye.com/user/projects/57605b3d49310500437fb418)

Commander is a task manager/runner application for PHP.

Requirements
------------

[](#requirements)

This application has the following requirements:

- PHP 5.6+
- ext-pdo\_sqlite

Usage
-----

[](#usage)

Commander was designed to be used as a type of SQLite based task manager and runner. You can add new tasks to the schedule, run them and watch the result. A task consists of a commandline which will be executed and an optional priority. For now the tasks are unique and can only be added once to the schedule.

You can use Commander in one of the three following ways.

### As a Phar

[](#as-a-phar)

This is the recommended way of using Commander. Download the latest Phar from the [releases](../../releases) section.

Commander can then be executed out of the box by running:

```
$ php commander.phar
```

### As a global Composer package

[](#as-a-global-composer-package)

Install composer in your project:

```
$ curl -s https://getcomposer.org/installer | php
```

Require the package as a global dependency via Composer:

```
$ php composer.phar global require gravitymedia/commander
```

### As a Composer dependency

[](#as-a-composer-dependency)

Install composer in your project:

```
$ curl -s https://getcomposer.org/installer | php
```

Require the package as a dependency for development via Composer:

```
$ php composer.phar require --dev gravitymedia/commander
```

Configuration
-------------

[](#configuration)

Commander can be configured with a JSON file named `commander.json`. This file should be located in the current working directory. It's location can also be defined with the `--configuration` option.

NameDescriptiondatabaseFilePathThe file path to the database filecacheDirectoryThe directory where the cache files will be stored (e.g. `.commander`)logFilePathThe file path to the log file (e.g. `commander.log`)processTimeoutThe timeout after which every task will be killedThe following configuration complies with the default configuration:

```
{
    "databaseFilePath": "commander.sqlite",
    "cacheDirectory": null,
    "logFilePath": null,
    "processTimeout": 60
}
```

Examples
--------

[](#examples)

You can list all the commands by running Commander without an argument.

For the following examples assume that Commander is available as a Phar in the current working directory.

### Create new task or update existing task

[](#create-new-task-or-update-existing-task)

```
$ php commander.phar join -- 'printf "Hello world!"'
$ php commander.phar join --priority=1000 -- 'printf "Hello world!"'
$ php commander.phar join -- 'printf "Let ms say hello:"'
```

The first command will join a task that will later print out `Hello world!`. The next command will change the priority of this task, so the next task will then run (with default priority) before this one.

### Show information about all joined tasks

[](#show-information-about-all-joined-tasks)

This command will list all tasks:

```
$ php commander.phar show
```

The output will be rendered as an ASCII table.

```
+--------------------------------------+----------+----------------------------+-----+-----------+---------------------+---------------------+
| ID                                   | Priority | Commandline                | PID | Exit Code | Created At          | Updated At          |
+--------------------------------------+----------+----------------------------+-----+-----------+---------------------+---------------------+
| 2E906453-41D6-4875-9678-67B3F130ADF6 | 1000     | printf "Hello world!"      |     |           | 2016-08-10 11:13:08 | 2016-08-10 11:13:28 |
| 441798A8-5F37-4147-B166-5A63C095B2DA | 1        | printf "Let me say hello:" |     |           | 2016-08-10 11:14:37 | 2016-08-10 11:14:37 |
+--------------------------------------+----------+----------------------------+-----+-----------+---------------------+---------------------+

```

### Run all joined tasks

[](#run-all-joined-tasks)

To run all joined tasks execute the following command:

```
$ php commander.phar run
```

The output will be printed to STDOUT and STDERR respectively. Use the `-q` option to omit the output. When a log file path was specified, the output will also be logged.

### Remove all terminated tasks

[](#remove-all-terminated-tasks)

To reduce the number of tasks in the database the terminated tasks can be purged of the database file:

```
$ php commander.phar purge
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Daniel Schröder](https://github.com/pCoLaSD)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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 ~20 days

Total

2

Last Release

3541d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e61ae24c7c960cd7bd94e0f0ac4501df18a8026d2538b0ed99176aec0462c16a?d=identicon)[schroedan](/maintainers/schroedan)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gravitymedia-commander/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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