From 820e63d3c2a1908bb69aedcc828b6f199a476b6d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 30 Apr 2025 08:47:01 -0500 Subject: [PATCH] =?UTF-8?q?Revert=20"12.x=20scheduled=20task=20failed=20no?= =?UTF-8?q?t=20dispatched=20on=20scheduled=20task=20failing=20(=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 1deaa36de67da614cccc7b84bb38093735a02b99. --- src/Illuminate/Console/Scheduling/ScheduleRunCommand.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php b/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php index 047577372b18..75cb579925cf 100644 --- a/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php +++ b/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php @@ -2,7 +2,6 @@ namespace Illuminate\Console\Scheduling; -use Exception; use Illuminate\Console\Application; use Illuminate\Console\Command; use Illuminate\Console\Events\ScheduledTaskFailed; @@ -197,10 +196,6 @@ protected function runEvent($event) round(microtime(true) - $start, 2) )); - if ($event->exitCode !== 0) { - throw new Exception("Scheduled command [{$event->command}] failed with exit code [{$event->exitCode}]."); - } - $this->eventsRan = true; } catch (Throwable $e) { $this->dispatcher->dispatch(new ScheduledTaskFailed($event, $e));