larawelders / scheduler-event-logger
Log Laravel scheduler lifecycle events.
Package info
github.com/larawelders/scheduler-event-logger
pkg:composer/larawelders/scheduler-event-logger
Requires
- php: ^8.2
- illuminate/console: ^12.0|^13.0
- illuminate/contracts: ^12.0|^13.0
- illuminate/events: ^12.0|^13.0
- illuminate/support: ^12.0|^13.0
Requires (Dev)
- larastan/larastan: ^3.9
- mockery/mockery: ^1.6
- orchestra/testbench: ^10.11
- phpunit/phpunit: ^11.5
This package is auto-updated.
Last update: 2026-05-07 03:51:17 UTC
README
Log Laravel scheduler lifecycle events to a dedicated schedule log channel.
Support Matrix
| Package | PHP | Laravel |
|---|---|---|
1.x |
8.2+ |
12.x / 13.x |
Notes:
- Laravel 12 supports PHP
8.2through8.5. - Laravel 13 requires PHP
8.3+, so PHP8.2is only valid with Laravel 12.
What it logs
ScheduledTaskStartingatinfoScheduledTaskFinishedatinfoScheduledTaskFailedaterrorScheduledTaskSkippedatinfoScheduledBackgroundTaskFinishedatinfoSchedulePausedatinfoScheduleResumedatinfo
Installation
composer require larawelders/scheduler-event-logger
The package uses Laravel package discovery, so no manual provider registration is required.
The package registers a default schedule log channel at runtime if your application does not already define one. By default, it uses a daily channel that writes to date-named files under storage/logs/schedule.log.
If you want to customize the channel name or logger configuration, publish the package config:
php artisan vendor:publish --tag=scheduler-event-logger-config
The published config lets you change both the channel name and the underlying channel definition:
'channel' => 'schedule', 'channel_config' => [ 'driver' => 'daily', 'path' => storage_path('logs/schedule.log'), 'level' => 'debug', ],
If your application already defines a channel with the configured name in config/logging.php, the application definition takes precedence:
'channels' => [ 'schedule' => [ 'driver' => 'single', 'path' => storage_path('logs/app-schedule.log'), 'level' => 'info', ], ],
Example Output
[framework/schedule-9f57b5c9...] Starting task "daily-report" on timezone UTC
[framework/schedule-9f57b5c9...] Finished task "daily-report" on timezone UTC with exit code 0 in 0.125s
[framework/schedule-a1b3f70e...] Failed task `php artisan sync:vendors` after RuntimeException: API timeout
[framework/schedule-a1b3f70e...] Skipped task `php artisan sync:vendors`
[framework/schedule-70c74e7f...] Background task finished `php artisan imports:run` in background with exit code 0
[schedule] Paused
[schedule] Resumed
Development
composer install composer run analyse