From d1fc4b60c57184d3daf50c9715a46b5f2589babf Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 9 Jan 2025 16:56:56 -0800 Subject: [PATCH] only clear interrupt signal if we have repeatable commands --- src/Illuminate/Console/Scheduling/ScheduleRunCommand.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php b/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php index 917ff9a183b1..b914229af51b 100644 --- a/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php +++ b/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php @@ -112,12 +112,14 @@ public function handle(Schedule $schedule, Dispatcher $dispatcher, Cache $cache, $this->handler = $handler; $this->phpBinary = Application::phpBinary(); - $this->clearInterruptSignal(); - $this->newLine(); $events = $this->schedule->dueEvents($this->laravel); + if ($events->contains->isRepeatable()) { + $this->clearInterruptSignal(); + } + foreach ($events as $event) { if (! $event->filtersPass($this->laravel)) { $this->dispatcher->dispatch(new ScheduledTaskSkipped($event));