Nextrun not updatink when running reboot on demand
This commit is contained in:
parent
f5fa019ce0
commit
b410ab18ce
|
@ -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 %}
|
|
@ -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 = ?");
|
||||
|
|
Loading…
Reference in New Issue