60                if (!isset($this->possible_tasks[$arg])) {
 
   61                    throw new ilException(
'cron-task "' . $arg . 
'" is not defined');
 
   64                $task = $this->possible_tasks[$arg];
 
   69            foreach ($this->default_tasks as $task) {
 
   70                $task = $this->possible_tasks[$task];
 
   85        $classlocation = $task[
'location'] . 
'/classes';
 
   86        if (isset($task[
'sub_location']) && strlen($task[
'sub_location'])) {
 
   87            $classlocation .= 
'/' . $task[
'sub_location'];
 
   89        $classfile .= $classlocation . 
'/class.' . $task[
'classname'] . 
'.php';
 
   91        $classname = $task[
'classname'];
 
   92        $method = $task[
'method'];
 
   94        $condition = $task[
'condition'];
 
  100        if (!file_exists($classfile)) {
 
  101            throw new ilException(
'class file "' . $classfile . 
'" does not exist');
 
  104        require_once($classfile);
 
  106        if (!class_exists($classname)) {
 
  107            throw new ilException(
'class "' . $classname . 
'" does not exist');
 
  110        if (!method_exists($classname, $method)) {
 
  111            throw new ilException(
'method "' . $classname . 
'::' . $method . 
'()" does not exist');
 
  120            $ilLog->write(
"CRON - starting task: " . $classname . 
"::" . $method);
 
  122            $task = 
new $classname;
 
  125            $ilLog->write(
"CRON - finished task: " . $classname . 
"::" . $method);
 
  127            $ilLog->write(
"CRON - task condition failed: " . $classname . 
"::" . $method);
 
  135        $this->default_tasks = array(
 
  136                'ilCronValidator::check' 
  139        $this->possible_tasks = array(
 
  142                'ilCronValidator::check' => array(
 
  143                    'classname'         => 
'ilCronValidator',
 
  145                    'location'          => 
'cron',
 
  146                    'condition'         => (
$ilSetting->get(
'systemcheck_cron') == 1)
 
An exception for terminatinating execution or to throw for unit testing.
Base class for ILIAS Exception handling.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']