From: Alexander Ebert Date: Mon, 22 Aug 2011 19:42:00 +0000 (+0200) Subject: Increased added value for afterNextExec X-Git-Tag: 2.0.0_Beta_1~1831 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7dabbb18927ec523716a2a874d4de116383d1f87;p=GitHub%2FWoltLab%2FWCF.git 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. --- 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(