diff --git a/templates/overview.html.twig b/templates/overview.html.twig index 318cfee..49fa02d 100644 --- a/templates/overview.html.twig +++ b/templates/overview.html.twig @@ -49,6 +49,6 @@ {% endblock %} \ No newline at end of file diff --git a/webcron.php b/webcron.php index 0a362e2..1d3ec31 100644 --- a/webcron.php +++ b/webcron.php @@ -48,7 +48,7 @@ if (file_exists("cache/get-services.trigger")) { $stmt = $db->prepare("INSERT INTO runs(job, statuscode, result, timestamp) VALUES(?, ?, ?, ?)"); $stmt->execute(array($result['jobID'], '200', $services, time())); - $nextrun = $result['nextrun'] + $result['delay']; + $nextrun = ($result['nextrun'] < time()) ? $result['nextrun'] + $result['delay'] : $result['nextrun']; if ($nextrun < time() ) { $nextrun = time() + $result['delay']; } $nexttime = $db->prepare("UPDATE jobs SET nextrun = ? WHERE jobID = ?");