New package proposal: yiisoft/schedule — recurring tasks for Yii 3 #529
Closed
zoranbogoevskimkd
started this conversation in
Ideas
Replies: 1 comment
|
Closing this one — reposting from my main account (@KalimeroMK), posted from a secondary account by mistake. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
At work we are migrating a large project from Yii 2 to Yii 3, and one capability we lost in the move is scheduling: omnilight/yii2-scheduling hard-requires
yiisoft/yii2, so it simply cannot be installed in a Yii 3 application. This package started as our partial solution to that problem, extracted and generalized.Proposal: a new framework-agnostic package,
yiisoft/schedule— recurring tasks defined in PHP, driven by a single cron entry (schedule:run) or a daemon (schedule:work).Design sketch, borrowing the parts of Symfony Scheduler that proved out:
TriggerInterfaceas a pure function (last run → next run), with cron (dragonmantank/cron-expression), periodic-interval and callback implementationsyiisoft/queueyiisoft/mutex, missed-run catch-up via any PSR-16 cache, PSR-14 events (where Sentry cron check-ins plug in)yiisoft/yii-consoleparams — zero application wiringA working implementation with tests and full QA tooling is up at KalimeroMK/yii-schedule — happy to transfer it to the yiisoft org, or keep it as a community package if you prefer.
Mainly looking for feedback on: the naming, the queue integration boundary, and whether this is something you'd want as an official package.
All reactions