-
Notifications
You must be signed in to change notification settings - Fork 2
Schedule
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Helpers\Schedule provides a fluent scheduler for cron-like execution windows.
command(callable $functionToRun, mixed $args = null): selfeveryMinute(), everyTwoMinutes(), everyFiveMinutes(), everyTenMinutes(), everyThirtyMinutes()hourly(), hourlyAt(int $minutes), everyTwoHours(), everySixHours()daily(), dailyAtNoon(), dailyAt(string $time), twiceDaily(string $time1, string $time2)weekly(), weeklyOn(int $dayOfTheWeek, string $time)monthly(), monthlyOn(int $dayOfTheMonth, string $time), lastDayOfMonth(string $time)quarterly(), yearly(), yearlyOn(int $month, int $dayOfTheMonth, string $time)
$schedule = new \Pair\Helpers\Schedule();
$schedule
->command(function () {
(new CleanupService())->run();
})
->dailyAt('02:30');-
command()stores the callback and optional arguments. - Frequency methods return the scheduler result used by the internal engine.
See also: ScheduleLog, Log.