diff --git a/runnow.php b/runnow.php index 1041d46..08ea59b 100644 --- a/runnow.php +++ b/runnow.php @@ -39,7 +39,7 @@ if ($jobnameResult[0]["user"] != $_SESSION["userID"]) { die(json_encode(array("error" => "You dirty hacker!"))); } $nosave = false; -if (filter_var($result["type"], FILTER_VALIDATE_URL)) { +if (filter_var($result["url"], FILTER_VALIDATE_URL)) { $client = new \GuzzleHttp\Client(); $res = $client->request('GET', $jobnameResult[0]['url']); diff --git a/webcron.php b/webcron.php index 71137fa..80f073c 100644 --- a/webcron.php +++ b/webcron.php @@ -57,7 +57,7 @@ if (file_exists("cache/get-services.trigger")) { unlink("cache/get-services.trigger"); } -$stmt = $db->query('SELECT jobID, url, delay, nextrun, type FROM jobs WHERE nextrun < ' . time()); +$stmt = $db->query('SELECT jobID, url, delay, nextrun FROM jobs WHERE nextrun < ' . time()); $results = $stmt->fetchAll(PDO::FETCH_ASSOC); $client = new \GuzzleHttp\Client();