Ejemplo n.º 1
0
    public function __wakeup()
    {
        $this->filename = CACHE_PATH . 'map.' . md5($_SESSION['_login'] . $_SESSION['_pass']) . '.js';
        if (file_exists($this->filename)) {
            $this->lastrun = filemtime($this->filename);
            $sqlr = DataEngine::sql('SELECT udate FROM SQL_PREFIX_Coordonnee ORDER BY udate DESC LIMIT 1');
            $sqla = mysql_fetch_array($sqlr);
            if ($this->lastrun > $sqla['udate']) {
                $this->CronPattern = strftime("%M %H %d %m 0", time() + 3600);
            } else {
                $this->CronPattern = strftime("%M %H %d %m %w", time());
            }
        } else {
            $this->lastrun = 0;
            $this->CronPattern = '* * * * *';
        }
    }
}
// -----------------------------------------------------------------------------
DataEngine::conf_cache('cron');
$cron_conf = DataEngine::config('cron');
if (is_object($cron_conf)) {
    $cron = $cron_conf;
} else {
    $cron = phpcron_list::getinstance();
    $cron->AddJob(new job_vortex());
    $cron->AddJob(new job_buttons());
    $cron->AddJob(new job_css());
    $cron->AddJob(new job_map_tooltips());
}
//DataEngine::Grab_Custom_Jobs();
Ejemplo n.º 2
0
 public function RunJob()
 {
     $this->lastrun = time();
     phpcron_list::getinstance()->Log(get_class($this));
     $this->_unlock();
 }