Download the PHP package gravitymedia/commander without Composer
On this page you can find all versions of the php package gravitymedia/commander. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gravitymedia/commander
More information about gravitymedia/commander
Files in gravitymedia/commander
Package commander
Short Description Commander is a task manager/runner application for PHP.
License MIT
Informations about the package commander
Commander
Commander is a task manager/runner application for PHP.
Requirements
This application has the following requirements:
- PHP 5.6+
- ext-pdo_sqlite
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
This is the recommended way of using Commander. Download the latest Phar from the releases section.
Commander can then be executed out of the box by running:
As a global Composer package
Install composer in your project:
Require the package as a global dependency via Composer:
As a Composer dependency
Install composer in your project:
Require the package as a dependency for development via Composer:
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.
Name | Description |
---|---|
databaseFilePath | The file path to the database file |
cacheDirectory | The directory where the cache files will be stored (e.g. .commander ) |
logFilePath | The file path to the log file (e.g. commander.log ) |
processTimeout | The timeout after which every task will be killed |
The following configuration complies with the default configuration:
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
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
This command will list all tasks:
The output will be rendered as an ASCII table.
Run all joined tasks
To run all joined tasks execute the following command:
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
To reduce the number of tasks in the database the terminated tasks can be purged of the database file:
Contributing
Please see CONTRIBUTING for details.
Credits
- Daniel Schröder
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of commander with dependencies
ext-pdo_sqlite Version *
doctrine/orm Version ^2.5
gedmo/doctrine-extensions Version ^2.4
monolog/monolog Version ^1.21
symfony/console Version ^3.1
symfony/process Version ^3.1
symfony/serializer Version ^3.1
zendframework/zend-servicemanager Version ^3.1