goedemiddag / laravel-schedule-monitor
定时任务监控
v1.4.0
2024-04-30 08:52 UTC
Requires
- php: ^8.1
- illuminate/console: ^9.0|^10.0|^11.0
- illuminate/http: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
Requires (Dev)
- driftingly/rector-laravel: ^1.0
- guzzlehttp/guzzle: ^7.5
- laravel/pint: ^1.12
- orchestra/testbench: ^7.17|^8.0|^9.0
- php-http/guzzle7-adapter: ^1.0
- phpstan/phpstan: ^1.9
- rector/rector: ^1.0
- sentry/sentry: ^3.12.1
README
此包允许您监控您的定时命令和任务。
支持的实现
安装
首先使用composer通过以下命令安装包
composer require goedemiddag/laravel-schedule-monitor
用法
Sentry
将monitorWithSentry
方法链到计划中。此方法接受Sentry提供的UUID。
protected function schedule(Schedule $schedule) { $schedule->command(Inspire::class) ->daily() ->monitorWithSentry('[uuid]') }
Better Stack
将monitorWithBetterstack
方法链到计划中。此方法接受Better Stack提供的ID。
protected function schedule(Schedule $schedule) { $schedule->command(Inspire::class) ->daily() ->monitorWithBetterstack('[id]') }