{"id":23843519,"url":"https://github.com/phpstreamserver/scheduler","last_synced_at":"2025-08-01T09:03:41.982Z","repository":{"id":264336917,"uuid":"892746634","full_name":"phpstreamserver/scheduler","owner":"phpstreamserver","description":"[READ ONLY] Scheduler Plugin for PHPStreamServer","archived":false,"fork":false,"pushed_at":"2024-12-27T18:07:05.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-12-27T19:19:02.585Z","etag":null,"topics":["phpstreamserver"],"latest_commit_sha":null,"homepage":"https://phpstreamserver.dev","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phpstreamserver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-22T17:41:40.000Z","updated_at":"2024-12-27T18:07:08.000Z","dependencies_parsed_at":"2024-12-27T19:18:29.370Z","dependency_job_id":"ece4f352-5c78-4552-8d95-7787c4efa42c","html_url":"https://github.com/phpstreamserver/scheduler","commit_stats":null,"previous_names":["phpstreamserver/scheduler"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstreamserver%2Fscheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstreamserver%2Fscheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstreamserver%2Fscheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstreamserver%2Fscheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpstreamserver","download_url":"https://codeload.github.com/phpstreamserver/scheduler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232250736,"owners_count":18494772,"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":["phpstreamserver"],"created_at":"2025-01-02T19:48:03.519Z","updated_at":"2025-08-01T09:03:41.942Z","avatar_url":"https://github.com/phpstreamserver.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/phpstreamserver/.github/refs/heads/main/assets/phpss_scheduler_light.svg\"\u003e\n    \u003cimg alt=\"PHPStreamServer logo\" align=\"center\" width=\"70%\" src=\"https://raw.githubusercontent.com/phpstreamserver/.github/refs/heads/main/assets/phpss_scheduler_dark.svg\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n## Scheduler Plugin for PHPStreamServer\n![PHP \u003e=8.2](https://img.shields.io/badge/PHP-\u003e=8.2-777bb3.svg)\n![Version](https://img.shields.io/github/v/tag/phpstreamserver/scheduler?label=Version\u0026filter=v*.*.*\u0026sort=semver\u0026color=374151)\n![Downloads](https://img.shields.io/packagist/dt/phpstreamserver/scheduler?label=Downloads\u0026color=f28d1a)\n\nThe Scheduler Plugin for **PHPStreamServer** extends the core functionality by providing a scheduling capability,\nallowing you to run programs or tasks at specific intervals, much like a traditional cron job.\n\n### Features\n - Defining schedules using cron syntax.\n - Defining schedules using relative date format as supported by \\DateInterval.\n\n### Install\n```bash\n$ composer require phpstreamserver/core phpstreamserver/scheduler\n```\n\n### Configure\nHere is an example of a simple server configuration with scheduler.\n\n```php\n// server.php\n\nuse PHPStreamServer\\Core\\Server;\nuse PHPStreamServer\\Plugin\\Scheduler\\SchedulerPlugin;\nuse PHPStreamServer\\Plugin\\Scheduler\\Worker\\PeriodicProcess;\n\n$server = new Server();\n\n$server-\u003eaddPlugin(\n    new SchedulerPlugin(),\n);\n\n$server-\u003eaddWorker(\n    new PeriodicProcess(\n        name: 'Scheduled process',\n        schedule: '*/1 * * * *',\n        onStart: function (PeriodicProcess $worker): void {\n            // runs every 1 minute\n        },\n    ),\n);\n\nexit($server-\u003erun());\n```\n\n### Run\n```bash\n$ php server.php start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpstreamserver%2Fscheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpstreamserver%2Fscheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpstreamserver%2Fscheduler/lists"}