Proof of Concept of a daemon running from a Symfony2 Command
Switch branches/tags
Nothing to show
Latest commit be4d18c Feb 25, 2013 @borisguery Merge pull request #1 from zazoomauro/patch-1
Update src/Bgy/DaemonBundle/Command/DaemonRunCommand.php

Symfony2 Command Daemon (Proof of Concept)

Table of contents

  1. Description
  2. Installation
  3. Usage
  4. Contributing
  5. Requirements
  6. Authors
  7. License


Minimal application to demonstrate how to create a detached daemon from a Symfony2 Command


$ git clone
$ composer install


$ php app/console daemon:run [-d] [-w n]

-d option is used to detach (put in background)

-w seconds specify the number of second to wait on each iteration in the main daemon loop

If the daemon is ran without the -d option, the output is STDOUT.

If you run it in detached mode, you can tail -fn0 daemon.log to check the current daemon status

$ php app/console daemon:stop

Use this command to stop a detached daemon.


If you have some time to spare on an useless project and would like to help take a look at the list of issues.


  • PHP 5.3+
  • pcntl php extension
  • Internet connection


Boris Guéry - - -


Symfony2ConsoleDaemon is licensed under the WTFPL License - see the LICENSE file for details