biohazard / laravel-schedule
Laravel schedule calling multiple commands
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/biohazard/laravel-schedule
Requires
- biohazard/group-chains: 0.0.1
This package is auto-updated.
Last update: 2025-10-10 13:24:17 UTC
README
composer require biohazard/laravel-schedule
App\Console\Kernel.php
<?php ... use Biohazard\Kernel as ConsoleKernel; ... class Kernel extends ConsoleKernel { ... protected function schedule(Schedule $schedule): void { $schedule->commands( 'command1', 'command2', 'command3', )->name('Name') ->storeOutput() ->onSuccess(function (Stringable $output) { echo 'Schedule task output success '. $output; })->onFailure(function (Stringable $output) { echo 'Schedule task output failured '. $output; }) ->dailyAt('20:00') ->run(); $schedule->jobs( new Job1, new Job2, new Job3, )->name('Name') ->dailyAt('21:00') ->run(); } ... }