Browse Source

Update 'api/cron.php'

master
pbug 7 years ago
parent
commit
0be2ac8f58
  1. 4
      api/cron.php

4
api/cron.php

@ -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();

Loading…
Cancel
Save