PHPackages                             orkestra/daemon - 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. orkestra/daemon

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

orkestra/daemon
===============

Run PHP scripts as a background daemon

1.0.0(13y ago)6201[1 issues](https://github.com/orkestra/orkestra-daemon/issues)MITPHPPHP &gt;=5.3.2

Since Dec 31Pushed 13y ago2 watchersCompare

[ Source](https://github.com/orkestra/orkestra-daemon)[ Packagist](https://packagist.org/packages/orkestra/daemon)[ RSS](/packages/orkestra-daemon/feed)WikiDiscussions develop Synced 1w ago

READMEChangelogDependenciesVersions (3)Used By (0)

orkestra-daemon
===============

[](#orkestra-daemon)

[![Build Status](https://camo.githubusercontent.com/66e9e378e800403b87f4be340be1418ba829880f47f7ae532a529da97585003d/68747470733a2f2f7472617669732d63692e6f72672f6f726b65737472612f6f726b65737472612d6461656d6f6e2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/orkestra/orkestra-daemon)

Daemonize your PHP scripts to accomplish work in the background.

Note: This library requires that you install the Process Control and POSIX extensions.

Installation
------------

[](#installation)

The easiest way to add orkestra-common to your project is using composer.

Add orkestra-common to your `composer.json` file:

```
{
    "require": {
        "orkestra/daemon": "dev-master"
    }
}
```

Then run `composer install` or `composer update`.

Usage
-----

[](#usage)

Spawning a new worker process using `pcntl_exec`:

```
