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

ActiveLibrary

alanpich/daemon
===============

Lightweight wrapper for starting &amp; stopping background processes

022PHP

Since Nov 26Pushed 12y ago1 watchersCompare

[ Source](https://github.com/alanpich/php-daemon)[ Packagist](https://packagist.org/packages/alanpich/daemon)[ RSS](/packages/alanpich-daemon/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Daemon Processes
================

[](#daemon-processes)

====================

Spawns background processes via PHP. Can also stop them again

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

[](#installation)

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

Usage
-----

[](#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();
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3516ea7520953bff4a918bb4e20a971438accdb8c85fd96020284a165e2245f?d=identicon)[alanpich](/maintainers/alanpich)

---

Top Contributors

[![alanpich](https://avatars.githubusercontent.com/u/902992?v=4)](https://github.com/alanpich "alanpich (4 commits)")

### Embed Badge

![Health badge](/badges/alanpich-daemon/health.svg)

```
[![Health](https://phpackages.com/badges/alanpich-daemon/health.svg)](https://phpackages.com/packages/alanpich-daemon)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
