codemonster-ru / scheduler
Task scheduling primitives for Annabel applications.
v1.0.0
2026-06-10 14:37 UTC
Requires
- php: >=8.2
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.0 || ^12.0
This package is not auto-updated.
Last update: 2026-06-11 13:49:14 UTC
README
Task scheduling primitives for Annabel applications.
Usage
use Codemonster\Scheduler\Schedule; $schedule = new Schedule(); $schedule->call(fn () => cleanup(), 'cleanup')->dailyAt('03:00'); $schedule->call(fn () => syncFeed(), 'sync-feed') ->everyFiveMinutes() ->withoutOverlapping(); $results = $schedule->runDue(new DateTimeImmutable());
Run schedule:run every minute from cron in a framework application.
Use withoutOverlapping() for tasks that must not run concurrently. Annabel
uses the configured cache store for scheduler locks when the framework cache
provider is registered.
Framework applications can inspect registered tasks with schedule:list.