dereuromark / cakephp-queue-scheduler
QueueScheduler plugin for CakePHP
Installs: 787
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 0
Open Issues: 2
Type:cakephp-plugin
Requires
- php: >=8.1
- cakephp/cakephp: ^5.0.1
- dereuromark/cakephp-queue: ^7.0.0 || ^8.0.0
- dereuromark/cakephp-tools: ^3.0.0
- dragonmantank/cron-expression: ^3.3
Requires (Dev)
- cakephp/migrations: ^4.1.0
- dereuromark/cakephp-templating: ^0.2.2
- fig-r/psr2r-sniffer: dev-master
- panlatent/cron-expression-descriptor: ^1.1.0
- phpunit/phpunit: ^10.3
README
A scheduler addon for Queue plugin.
This branch is for use with CakePHP 5.0+. For details see version map.
Motivation
A DB and queue based cronjob system does not require a sys-admin to manually modify the crontab file on a server. It also allows for easier multi-server (worker) environments.
Such a system provides easier input and "frequency" validation, as well as visual output of the schedule in the backend. For smaller projects it can also be ported more easily between systems (e.g. dev/stage/prod) using migrations instead of having to touch the server config.
Also logging and i18n customization can potentially be easier to get addressed this way.
Finally, with the Queue plugin integrating it can smoothly work alongside your existing Queue tasks. Any failed job (e.g. network issue, or email SMTP issue) can be automatically re-run x times as per config.
Further features:
- Concurrency handling: Decision in case a job is still running or failed in queue, if it will run now ones or just skip.
- The backend can provide buttons to also "trigger" any scheduled job manually where needed.
- Autocomplete or proposals based on available Cake commands or Queue tasks.
Installation
You can install this plugin into your CakePHP application using composer.
composer require dereuromark/cakephp-queue-scheduler
Installation and Usage
See Documentation.
Credit where credit is due
This plugin is heavily inspired by LordSimal Scheduler plugin and Laravel Task Scheduling Feature.
Use this Scheduler plugin if you prefer configuring them file-based and purely in crontab style.