protected function getCronjobsTodo() { require_once 'includes/classes/Cronjob.class.php'; $this->assign(array('cronjobs' => Cronjob::getNeedTodoExecutedJobs())); }
<?php define('MODE', 'CRON'); define('ROOT_PATH', str_replace('\\', '/', dirname(__FILE__)) . '/'); set_include_path(ROOT_PATH); require 'includes/common.php'; // Output transparent gif HTTP::sendHeader('Cache-Control', 'no-cache'); HTTP::sendHeader('Content-Type', 'image/gif'); HTTP::sendHeader('Expires', '0'); $isSessionActive = $SESSION->isActiveSession(); echo "GIF89a€!ù,D;"; if (!$isSessionActive) { exit; } $cronjobID = HTTP::_GP('cronjobID', 0); if (empty($cronjobID)) { exit; } require 'includes/classes/Cronjob.class.php'; $cronjobsTodo = Cronjob::getNeedTodoExecutedJobs(); if (!in_array($cronjobID, $cronjobsTodo)) { exit; } Cronjob::execute($cronjobID);