codemonster-ru/scheduler

Task scheduling primitives for Annabel applications.

Maintainers

Package info

github.com/codemonster-ru/scheduler

pkg:composer/codemonster-ru/scheduler

Statistics

Installs: 68

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-06-10 14:37 UTC

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.