echo "[CHECKER] Looks like another checker is running, exiting..." . PHP_EOL;
echo date("H:i:s") . " [CHECKER] Looks like another checker is running, exiting..." . PHP_EOL;
exit(-1);
exit(-1);
}
}
echo "[DB] Fetching hosts to check from database" . PHP_EOL;
echo date("H:i:s") . " [DB] Fetching hosts to check from database" . PHP_EOL;
if ((($options['fullhour'] >= 0) && ($options['fullhour'] <= 23)) && date('H') == $options['fullhour'] || $full) { // check all hosts at full check hour or when argument 'full' passed
if ((($options['fullhour'] >= 0) && ($options['fullhour'] <= 23)) && date('H') == $options['fullhour'] || $full) { // check all hosts at full check hour or when argument 'full' passed
echo "[CHECKER] Starting FULL check" . PHP_EOL;
echo date("H:i:s") . " [CHECKER] Starting FULL check" . PHP_EOL;
$STH = $pdo->query("SELECT `host`, `base32` FROM `hosts`");
$STH = $pdo->query("SELECT `host`, `base32` FROM `hosts`");