Scheduling
super-admin-org/scheduling lists the tasks of Laravel's scheduler with their cron expression in plain words, the next run time and description, and runs a task on demand with its output shown on the page.
| Package | super-admin-org/scheduling |
| Admin URL | /admin/scheduling |
| Menu | Scheduling |
| Permission | ext.scheduling (path /scheduling*) |
Installation
composer require super-admin-org/scheduling
php artisan admin:import scheduling
Define tasks as usual. Laravel 8–10, in app/Console/Kernel.php:
protected function schedule(Schedule $schedule): void
{
$schedule->command('inspire')->everyTenMinutes();
$schedule->command('backup:run')->dailyAt('02:00')->description('Nightly backup');
}
Laravel 11 and newer, in routes/console.php:
use Illuminate\Support\Facades\Schedule;
Schedule::command('backup:run')->dailyAt('02:00')->description('Nightly backup');
The page only lists tasks; the scheduler itself still needs the usual cron entry (* * * * * php artisan schedule:run) or php artisan schedule:work.
Using it
Each row shows:
- the task (
artisan <command>, a shell command, or the description of a closure) and its flags (without overlapping, on one server, in background, environments); - the cron expression with its meaning ("At 02:00 on every day.");
- the next run time and its timezone;
- Last run (2.0+): when the task last ran, whether from the panel (and by whom) or by the scheduler, its exit code and duration. Runs are kept in the cache for 30 days;
- the description.
Run executes the task now, inside the web request, and shows its output, exit code and duration below the table.
Configuration
'extensions' => [
'scheduling' => [
'allow_run' => true, // 2.0+: false hides the Run buttons (recommended in production)
],
],
Compatibility
| Laravel | PHP | State |
|---|---|---|
| 8 – 10 | 8.0+ | Lists tasks from app/Console/Kernel.php. |
| 11 – 13 | 8.0+ | Lists tasks from routes/console.php and ->withSchedule() from release 2.0. Releases 1.x show an empty list there. |
Run uses the web server's PHP and time limit. Long tasks are better started from the command line.
Troubleshooting
| Problem | Fix |
|---|---|
Output shows sh: : command not found | Set PHP_BINARY=/path/to/php in .env so the scheduler can find PHP. |
| A task runs as a different user | Tasks run as the web server user; files they create belong to that user. |