From 4cfbf5468edf65d835cb173b8f46767b44b4ee32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Ioni=C8=9B=C4=83?= Date: Fri, 19 Jan 2024 14:33:43 +0100 Subject: [PATCH] add ping command --- app/Console/Commands/PingCommand.php | 34 ++++++++++++++++++++++++++++ app/Console/Kernel.php | 6 +++++ 2 files changed, 40 insertions(+) create mode 100644 app/Console/Commands/PingCommand.php diff --git a/app/Console/Commands/PingCommand.php b/app/Console/Commands/PingCommand.php new file mode 100644 index 0000000..51a3f8e --- /dev/null +++ b/app/Console/Commands/PingCommand.php @@ -0,0 +1,34 @@ +info('Pong!'); + + return static::SUCCESS; + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 6eb9f6e..b8ed08e 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -4,6 +4,7 @@ namespace App\Console; +use App\Console\Commands\PingCommand; use App\Console\Commands\ProcessProtocolsCommand; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; @@ -24,6 +25,11 @@ protected function schedule(Schedule $schedule) ->timezone('Europe/Bucharest') ->withoutOverlapping() ->sentryMonitor('process-protocols'); + + $schedule->command(PingCommand::class) + ->everyTenMinutes() + ->withoutOverlapping() + ->sentryMonitor('ping'); } /**