Skip to content
Snippets Groups Projects
Commit 0be2ac8f authored by pbug's avatar pbug
Browse files

Update 'api/cron.php'

parent f45e3fa0
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,8 @@ $time = time();
echo "Cronjob<br>";
echo "Current time: ".$time."<br>";
$query = $pdo->prepare('SELECT * FROM simulations WHERE timestamp+repeat_interval * repeat_count < ? AND (status="scheduled" OR status="repeating");');
$query->execute(array($time));
$query = $pdo->prepare('SELECT * FROM simulations WHERE timestamp+repeat_interval * repeat_count < '.$time.' AND (status="scheduled" OR status="repeating");');
$query->execute();
//if this has any rows, we got sims that should be started now.
$sims = $query->fetchAll();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment