Proof of Concept of a daemon running from a Symfony2 Command
PHP
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

README.md

Symfony2 Command Daemon (Proof of Concept)

Table of contents

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

Description

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

Installation

$ git clone https://github.com/borisguery/Symfony2ConsoleDaemon.git
$ composer install

Usage

$ 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.

Contributing

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

Requirements

  • PHP 5.3+
  • pcntl php extension
  • Internet connection

Authors

Boris Guéry - guery.b@gmail.com - http://twitter.com/borisguery - http://borisguery.com

License

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