Browse Source

Fixed bugs

main
Jeroen De Meerleer 2 years ago
parent
commit
21cfb4da52
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      addjob.php
  2. +1
    -1
      editjob.php
  3. +1
    -1
      webcron.php

+ 1
- 1
addjob.php View File

@ -70,7 +70,7 @@ elseif ($_SERVER["REQUEST_METHOD"] == "POST") {
if (!$eternal) {
$lastrunObj = DateTime::createFromFormat("d/m/Y H:i:s", $_POST['lastrun']);
$lastrun = $nextrunObj->getTimestamp();
$lastrun = $lastrunObj->getTimestamp();
} else {
$lastrun = -1;
}


+ 1
- 1
editjob.php View File

@ -81,7 +81,7 @@ elseif ($_SERVER["REQUEST_METHOD"] == "POST") {
if (!$eternal) {
$lastrunObj = DateTime::createFromFormat("d/m/Y H:i:s", $_POST['lastrun']);
$lastrun = $nextrunObj->getTimestamp();
$lastrun = $lastrunObj->getTimestamp();
} else {
$lastrun = -1;
}


+ 1
- 1
webcron.php View File

@ -67,7 +67,7 @@ if (file_exists("cache/get-services.trigger")) {
}
}
$stmt = $db->prepare('SELECT * FROM jobs WHERE nextrun <= 1558742600 and (nextrun <= lastrun OR lastrun = -1)');
$stmt = $db->prepare('SELECT * FROM jobs WHERE nextrun <= ? and (nextrun <= lastrun OR lastrun = -1)');
$stmt->execute(array(time()));
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);
$client = new \GuzzleHttp\Client();


Loading…
Cancel
Save