PHPackages                             phlib/console-process - 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. phlib/console-process

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

phlib/console-process
=====================

Console implementation.

4.0.2(1y ago)1734.3k↓37.8%32LGPL-3.0PHPPHP ^8.0CI failing

Since Dec 2Pushed 1y ago5 watchersCompare

[ Source](https://github.com/phlib/console-process)[ Packagist](https://packagist.org/packages/phlib/console-process)[ RSS](/packages/phlib-console-process/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (4)Versions (18)Used By (2)

phlib/console-process
=====================

[](#phlibconsole-process)

[![Code Checks](https://camo.githubusercontent.com/eb0efdbb2e0d5584da78f0d6538c4bdf2ca14209846a6075b3465c868b5b91ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70686c69622f636f6e736f6c652d70726f636573732f636f64652d636865636b732e796d6c3f6c6f676f3d676974687562)](https://github.com/phlib/console-process/actions/workflows/code-checks.yml)[![Codecov](https://camo.githubusercontent.com/5c1ec69d46a90ed202852dc52dcc862ea0540fcad57e0047613e9a22dc0b82b4/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f70686c69622f636f6e736f6c652d70726f636573732e7376673f6c6f676f3d636f6465636f76)](https://codecov.io/gh/phlib/console-process)[![Latest Stable Version](https://camo.githubusercontent.com/d451af652daa6985b35e6b2c287c3809198dc296a19c467cbf15a4dac6013b38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70686c69622f636f6e736f6c652d70726f636573732e7376673f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/phlib/console-process)[![Total Downloads](https://camo.githubusercontent.com/f2213aa872807e8b154b5e53faa8efed41576ae1d8a30d30c9d33bcfd455e20b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70686c69622f636f6e736f6c652d70726f636573732e7376673f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/phlib/console-process)[![Licence](https://camo.githubusercontent.com/ec9b9dbcd4ff191e57be7b7a442104e671fc823815e5aa7ef687d0ae3175239c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70686c69622f636f6e736f6c652d70726f636573732e737667)](https://camo.githubusercontent.com/ec9b9dbcd4ff191e57be7b7a442104e671fc823815e5aa7ef687d0ae3175239c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70686c69622f636f6e736f6c652d70726f636573732e737667)

Console signal implementation using [PHPs Process control functions](http://php.net/manual/en/book.pcntl.php).

There are 2 implementations.

1. Background command. Repeatedly execute a command, until interrupted using the signal handler.
2. Daemon command. Builds on the Background command to allow forking (detaching) the process.

Install
-------

[](#install)

Via Composer

```
$ composer require phlib/console-process
```

Background Command
------------------

[](#background-command)

### Basic Usage

[](#basic-usage)

The Background Command is implemented in the same way as you're used to with the normal Symfony Command, however it must allow for the `execute()` method to be called multiple times. There is a processing delay between each execution which can be customised.

```
