From 6bbf792f54b7ea6133c5401176a4cc4b92f9ace0 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 acc5be390632..222638c24ec9 100644
--- a/core/lib/Drupal/Core/Cron.php
+++ b/core/lib/Drupal/Core/Cron.php
@@ -104,6 +104,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;
     }
@@ -121,7 +124,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