messy-one/daemon

Simple PHP daemon which handles tasks

1.2.0 2016-04-03 10:51 UTC

This package is not auto-updated.

Last update: 2024-12-21 19:47:42 UTC


README

Simple PHP daemon which handles database tasks

Usage

See example folder. There is an implemantation using Doctrine 2 for persisting and Monolog for logging.

How to run

Just run the daemon.php in a own PHP instance.

I suggest using of a tool for daemonizing approaches. Such a tool could be Supervisor. An example config for Supervisor looks like:

  [program:daemon]
  command=/usr/bin/php /var/www/myproject/daemon/daemon.php
  user=www-data
  autostart=true
  autorestart=true