PHPackages                             wiryonolau/php-cron-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. [CLI &amp; Console](/categories/cli)
4. /
5. wiryonolau/php-cron-daemon

ActiveLibrary[CLI &amp; Console](/categories/cli)

wiryonolau/php-cron-daemon
==========================

PHP daemon for script and cronjob

061PHP

Since Dec 4Pushed 8y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

php-cron-daemon
===============

[](#php-cron-daemon)

This a library to enable daemon task with php application using zf2 and pcntl extension.

Install using

```
composer require wiryonolau/php-cron-daemon

```

Add to your module.config.php, below is example

```
"cron_daemon" => array(
    array(
        "program" => "/usr/bin/php"
        "arguments" => array("/public/index.php", "application", "init", "-y"),
        "schedule" => "* * * * *",
        "work_count" => 1,
        "timeout" => 10
    )
)

```

Parameters

- program : an executable
- arguments : script path and their argument separate with array
- schedule (optional) :
    - default to false, it will be run as many as work\_count once, useful for infinite loop script such as rabbitmq worker
    - if specify ( must use cronjob format ) , daemon will run it when schedule is reach
- work\_count ( optional ) : default to 1 maximum 10, how many script have to run for current task
- timeout (optional) : task timeout in second default is 0 no timeout

To run the script as daemon you can use either init.d or systemd

If you use php task that using phpampqlib set set\_close\_on\_destruct to false, so daemon can kill it gracefully without leaving zombie process

```
$connection->set_close_on_destruct(false);

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

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/685e9ba7c8a905c121c746487ac6790986287a73ce30083721dd1e4763ef3ca4?d=identicon)[wiryono](/maintainers/wiryono)

---

Top Contributors

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

---

Tags

cronjobdaemonizephp5zf2

### Embed Badge

![Health badge](/badges/wiryonolau-php-cron-daemon/health.svg)

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M318](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M18](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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