Nextrun not updatink when running reboot on demand

This commit is contained in:
Jeroen De Meerleer 2017-05-10 16:48:11 +02:00
parent f5fa019ce0
commit b410ab18ce
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
2 changed files with 2 additions and 2 deletions

View File

@ -49,6 +49,6 @@
</div>
</div>
<div id='ajax_loader' style="position: fixed; left: 50%; top: 50%; display: none;">
<img src="/images/ajax-loader.gif">
<img src="/images/ajax-loader.gif" alt="loading">
</div>
{% endblock %}

View File

@ -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 = ?");