2026-01-14 21:46:04 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Inspiring;
|
|
|
|
|
use Illuminate\Support\Facades\Artisan;
|
2026-01-17 13:46:20 +02:00
|
|
|
use Illuminate\Support\Facades\Schedule;
|
2026-01-14 21:46:04 +02:00
|
|
|
|
|
|
|
|
Artisan::command('inspire', function () {
|
|
|
|
|
$this->comment(Inspiring::quote());
|
|
|
|
|
})->purpose('Display an inspiring quote');
|
2026-01-17 13:46:20 +02:00
|
|
|
|
|
|
|
|
// Schedule uptime monitoring to run every 5 minutes
|
|
|
|
|
Schedule::command('monitor:uptime')
|
|
|
|
|
->everyFiveMinutes()
|
|
|
|
|
->withoutOverlapping()
|
|
|
|
|
->runInBackground()
|
|
|
|
|
->appendOutputTo(storage_path('logs/uptime-monitoring.log'));
|
|
|
|
|
|
2026-01-17 16:42:43 +02:00
|
|
|
// Schedule ping monitoring to run every 5 minutes
|
|
|
|
|
Schedule::command('monitor:ping')
|
|
|
|
|
->everyFiveMinutes()
|
|
|
|
|
->withoutOverlapping()
|
|
|
|
|
->runInBackground()
|
|
|
|
|
->appendOutputTo(storage_path('logs/ping-monitoring.log'));
|
|
|
|
|
|
2026-01-17 13:46:20 +02:00
|
|
|
// Schedule SSL certificate monitoring to run daily
|
|
|
|
|
Schedule::command('monitor:ssl')
|
|
|
|
|
->daily()
|
|
|
|
|
->withoutOverlapping()
|
|
|
|
|
->runInBackground()
|
|
|
|
|
->appendOutputTo(storage_path('logs/ssl-monitoring.log'));
|
|
|
|
|
|
|
|
|
|
// Schedule broken link monitoring to run weekly
|
|
|
|
|
Schedule::command('monitor:links')
|
|
|
|
|
->weekly()
|
|
|
|
|
->withoutOverlapping()
|
|
|
|
|
->runInBackground()
|
|
|
|
|
->appendOutputTo(storage_path('logs/link-monitoring.log'));
|
2026-01-17 16:42:43 +02:00
|
|
|
|
|
|
|
|
// Schedule TCP port monitoring to run every 10 minutes
|
|
|
|
|
Schedule::command('monitor:tcp-ports')
|
|
|
|
|
->everyTenMinutes()
|
|
|
|
|
->withoutOverlapping()
|
|
|
|
|
->runInBackground()
|
|
|
|
|
->appendOutputTo(storage_path('logs/tcp-port-monitoring.log'));
|
|
|
|
|
|
|
|
|
|
// Schedule health endpoint monitoring to run every 5 minutes
|
|
|
|
|
Schedule::command('monitor:health')
|
|
|
|
|
->everyFiveMinutes()
|
|
|
|
|
->withoutOverlapping()
|
|
|
|
|
->runInBackground()
|
|
|
|
|
->appendOutputTo(storage_path('logs/health-monitoring.log'));
|
|
|
|
|
|
|
|
|
|
// Schedule DNS monitoring to run hourly
|
|
|
|
|
Schedule::command('monitor:dns')
|
|
|
|
|
->hourly()
|
|
|
|
|
->withoutOverlapping()
|
|
|
|
|
->runInBackground()
|
|
|
|
|
->appendOutputTo(storage_path('logs/dns-monitoring.log'));
|