diff --git a/library/includes/cron/cron_run.php b/library/includes/cron/cron_run.php index e3ff75649..06b5e8896 100644 --- a/library/includes/cron/cron_run.php +++ b/library/includes/cron/cron_run.php @@ -90,6 +90,10 @@ foreach ($cron_jobs as $job) { } } + if (!defined('CRONJOB_COMPLETED') || !CRONJOB_COMPLETED) { + return; + } + DB()->query(" UPDATE " . BB_CRON . " SET last_run = NOW(), diff --git a/src/Legacy/Admin/Cron.php b/src/Legacy/Admin/Cron.php index dfd61c032..6c7b918af 100644 --- a/src/Legacy/Admin/Cron.php +++ b/src/Legacy/Admin/Cron.php @@ -37,6 +37,11 @@ class Cron $job_script = INC_DIR . '/cron/jobs/' . $job; require($job_script); } + + if (!defined('CRONJOB_COMPLETED') || !CRONJOB_COMPLETED) { + return; + } + DB()->query(" UPDATE " . BB_CRON . " SET last_run = NOW(),