Fixed bugs
This commit is contained in:
parent
9dde6495cd
commit
0809cd3c4b
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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…
Reference in New Issue