{"id":15028869,"url":"https://github.com/wiryonolau/php-cron-daemon","last_synced_at":"2026-03-15T08:14:53.365Z","repository":{"id":57081196,"uuid":"112569342","full_name":"wiryonolau/php-cron-daemon","owner":"wiryonolau","description":"PHP ZF2 Daemon Process with Cron Task","archived":false,"fork":false,"pushed_at":"2018-04-11T02:44:30.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T04:32:07.245Z","etag":null,"topics":["cronjob","daemonize","php5","zf2"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiryonolau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-30T05:37:30.000Z","updated_at":"2017-12-04T00:23:15.000Z","dependencies_parsed_at":"2022-08-24T14:58:14.529Z","dependency_job_id":null,"html_url":"https://github.com/wiryonolau/php-cron-daemon","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiryonolau%2Fphp-cron-daemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiryonolau%2Fphp-cron-daemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiryonolau%2Fphp-cron-daemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiryonolau%2Fphp-cron-daemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiryonolau","download_url":"https://codeload.github.com/wiryonolau/php-cron-daemon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243338428,"owners_count":20275507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cronjob","daemonize","php5","zf2"],"created_at":"2024-09-24T20:09:14.750Z","updated_at":"2025-12-26T08:04:13.634Z","avatar_url":"https://github.com/wiryonolau.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-cron-daemon\n\nThis a library to enable daemon task with php application using zf2 and pcntl extension.\n\nInstall using\n```\ncomposer require wiryonolau/php-cron-daemon\n```\n\nAdd to your module.config.php, below is example\n```\n\"cron_daemon\" =\u003e array(\n    array(\n        \"program\" =\u003e \"/usr/bin/php\"\n        \"arguments\" =\u003e array(\"/public/index.php\", \"application\", \"init\", \"-y\"),\n        \"schedule\" =\u003e \"* * * * *\",\n        \"work_count\" =\u003e 1,\n        \"timeout\" =\u003e 10\n    )\n)\n```\n\nParameters\n- program : an executable\n- arguments : script path and their argument separate with array\n- schedule (optional) :\n  - default to false, it will be run as many as work_count once, useful for infinite loop script such as rabbitmq worker\n  - if specify ( must use cronjob format ) , daemon will run it when schedule is reach\n- work_count ( optional ) : default to 1 maximum 10, how many script have to run for current task\n- timeout (optional) : task timeout in second default is 0 no timeout \n\nTo run the script as daemon you can use either init.d or systemd\n\nIf you use php task that using phpampqlib set set_close_on_destruct to false, so daemon can kill it gracefully without leaving zombie process\n```\n$connection-\u003eset_close_on_destruct(false);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiryonolau%2Fphp-cron-daemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiryonolau%2Fphp-cron-daemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiryonolau%2Fphp-cron-daemon/lists"}