diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 89d679a47..d67a26720 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -138,7 +138,18 @@ private function check_scheduled_tasks($schedule) $scheduled_task->delete(); continue; } - + if ($application) { + if (str($application->status)->contains('running') === false) { + ray('application not running, skipping'); + continue; + } + } + if ($service) { + if (str($service->status)->contains('running') === false) { + ray('service not running, skipping'); + continue; + } + } if (isset(VALID_CRON_STRINGS[$scheduled_task->frequency])) { $scheduled_task->frequency = VALID_CRON_STRINGS[$scheduled_task->frequency]; }