From 7dabbb18927ec523716a2a874d4de116383d1f87 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 22 Aug 2011 21:42:00 +0200 Subject: [PATCH] Increased added value for afterNextExec Unfortunately a75e8c9 did not fix the problem as intended, values below 60 do not modify the date of next execution. This is caused by the way CronjobUtil disregards any timeframe below 1 minute (seconds aren't allowed for value anyway). To avoid this issue I've picked 120 seconds which is more than 1 minute (preventing nasty rounding errors) and far less to have any impact on the system. --- wcfsetup/install/files/lib/data/cronjob/CronjobAction.class.php | 2 +- .../install/files/lib/system/cronjob/CronjobScheduler.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/data/cronjob/CronjobAction.class.php b/wcfsetup/install/files/lib/data/cronjob/CronjobAction.class.php index 2654c5efe1..f3656d7dce 100644 --- a/wcfsetup/install/files/lib/data/cronjob/CronjobAction.class.php +++ b/wcfsetup/install/files/lib/data/cronjob/CronjobAction.class.php @@ -135,7 +135,7 @@ class CronjobAction extends AbstractDatabaseObjectAction { $nextExec = $cronjob->getNextExec(); $cronjob->update(array( 'nextExec' => $nextExec, - 'afterNextExec' => $cronjob->getNextExec(($nextExec + 1)) + 'afterNextExec' => $cronjob->getNextExec(($nextExec + 120)) )); // build the return value diff --git a/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php b/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php index bb243c3398..02bd6ebd98 100644 --- a/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php @@ -78,7 +78,7 @@ class CronjobScheduler extends SingletonFactory { // get time of next execution $nextExec = $cronjobEditor->getNextExec(); - $afterNextExec = $cronjobEditor->getNextExec(($nextExec + 1)); + $afterNextExec = $cronjobEditor->getNextExec(($nextExec + 120)); // mark cronjob as done $cronjobEditor->update(array( -- 2.20.1