``` bash php artisan make:command CheckStatusCommand && php artisan make:notification HorizonIsInactiveNotification ``` ``` php CheckStatusCommand shouldBeActive()) { return; } if ($this->isHorizonActive()) { return; } $this->error('Horizon is inactive on: ' . config('app.name')); Flare::report(new Exception('Horizon is inactive')); Notification::route('mail', 'dev@strixi.nl') ->notify(new HorizonIsInactiveNotification()); } protected function isHorizonActive(): bool { if (!$masters = app(MasterSupervisorRepository::class)->all()) { return false; } return collect($masters)->some(fn($master): bool => $master->status !== 'paused'); } protected function shouldBeActive(): bool { return config('queue.default') === 'redis'; } } ``` ``` php HorizonIsInactiveNotification subject('Horizon is inactive on: ' . config('app.name')) ->line('Horizon is inactive on: ' . config('app.name')) ->action('Goto site', url(config('app.url'))); } } ``` ``` php kernel or bootstrap $schedule->command(\App\Console\Commands\CheckStatusCommand::class)->everyFifteenMinutes(); ```