optimates-de / filament-schedule-monitor
Read-only Filament UI for spatie/laravel-schedule-monitor: scheduled task status, run history and descriptions.
Package info
github.com/OptimatesDE/filament-schedule-monitor
pkg:composer/optimates-de/filament-schedule-monitor
Requires
- php: ^8.3
- filament/filament: ^4.0|^5.0
- spatie/laravel-schedule-monitor: ^3.0|^4.0
README
A read-only Filament UI for
spatie/laravel-schedule-monitor:
see your scheduled tasks, their status, last run, run history and descriptions
right in the admin panel.
Requirements
- PHP 8.3+
- Filament v4 or v5
spatie/laravel-schedule-monitorv3 or v4 (pulled in as a dependency)
Installation
composer require optimates-de/filament-schedule-monitor
This package only adds the Filament UI. Set up the underlying monitor as described in the spatie docs:
php artisan vendor:publish --provider="Spatie\ScheduleMonitor\ScheduleMonitorServiceProvider"
php artisan migrate
Run the sync whenever the schedule changes (e.g. on every deploy):
php artisan schedule-monitor:sync
Usage
Register the plugin on a panel:
use OptimatesDE\FilamentScheduleMonitor\FilamentScheduleMonitorPlugin; $panel->plugin( FilamentScheduleMonitorPlugin::make() ->navigationGroup('System'), // optional );
Options
->navigationGroup(string|UnitEnum|null $group)— navigation group for the entry.->navigationSort(?int $sort)— sort within the group.->registerNavigation(bool $condition = true)— set tofalseto keep it out of the main menu (e.g. when linking it from a custom settings page); the resource stays reachable viaMonitoredScheduledTaskResource::getUrl('index').
Task descriptions
Descriptions are read live from the registered schedule, so adding
->description('…') to a scheduled task shows up in the UI:
Schedule::command('backup:run')->daily()->description('Create database backup');
License
MIT — see LICENSE.