2017 © Pedro Peláez
 

library daemon

Lightweight wrapper for starting & stopping background processes

image

alanpich/daemon

Lightweight wrapper for starting & stopping background processes

  • Tuesday, November 26, 2013
  • by alanpich
  • Repository
  • 1 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

# Daemon Processes

Spawns background processes via PHP. Can also stop them again, (*1)

Installation

{
    "require": {
        "alanpich/php-daemon": "*"
    }
}

Usage


// Command to execute $script = 'php '.dirname(__FILE__).'/index.php'; // File to log to $logFile = dirname(__FILE__).'/log.txt'; // Path to save pid file to $pidFile = dirname(__FILE__).'/process.pid'; // Create the daemon wrapper $daemon = new \AlanPich\Daemon\DaemonProcess($script,$pidFile,$logFile); $daemon->start(); echo $daemon->status()? 'RUNNING' : 'NOT RUNNING'; $daemon->stop();

The Versions

26/11 2013

dev-master

9999999-dev

Lightweight wrapper for starting & stopping background processes

  Sources   Download

MIT

by Alan Pich