Generate Cron File

This commit is contained in:
2020-04-10 09:14:59 +02:00
parent a81f7a596b
commit e34c2b690d
5 changed files with 21 additions and 4 deletions

View File

@@ -140,7 +140,9 @@ class Spot extends Main
),
'consts' => array(
'geo_server' => Settings::GEO_SERVER,
'modes' => Project::MODES )
'modes' => Project::MODES,
'default_timezone' => Settings::TIMEZONE
)
),
'index',
array(
@@ -169,6 +171,12 @@ class Spot extends Main
}
}
public function genCronFile() {
//$bResult = (file_put_contents('spot_cron.sh', '#!/bin/bash'."\n".'cd '.dirname($_SERVER['SCRIPT_FILENAME'])."\n".'php -f index.php a=update_feed')!==false);
$bResult = (file_put_contents('spot_cron.sh', '#!/bin/bash'."\n".'wget -qO- '.$this->asContext['serv_name'].'index.php?a=dummy > /dev/null')!==false);
return $bResult?self::SUCCESS:self::ERROR;
}
public function getMarkers()
{
$asMessages = $this->getSpotMessages();