From 147f22077eeedd3a2eb207ccbef41934159abbb6 Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Mon, 16 Sep 2024 21:12:01 +0100
Subject: [PATCH] Issue #1630576 by nexusnovaz, jhodgdon, catch: Cron reports
 it's done long before it really is done

---
 core/lib/Drupal/Core/Cron.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/core/lib/Drupal/Core/Cron.php b/core/lib/Drupal/Core/Cron.php
index ef5d33793439..001aa2ef2b9f 100644
--- a/core/lib/Drupal/Core/Cron.php
+++ b/core/lib/Drupal/Core/Cron.php
@@ -166,6 +166,9 @@ public function run() {
       // Release cron lock.
       $this->lock->release('cron');
 
+      // Add watchdog message.
+      $this->logger->info('Cron run completed.');
+
       // Return TRUE so other functions can check if it did run successfully
       $return = TRUE;
     }
@@ -183,7 +186,6 @@ protected function setCronLastTime() {
     // Record cron time.
     $request_time = $this->time->getRequestTime();
     $this->state->set('system.cron_last', $request_time);
-    $this->logger->info('Cron run completed.');
   }
 
   /**
-- 
GitLab