Definition at line 34 of file class.ilCronCheck.php.
◆ __construct()
ilCronCheck::__construct |
( |
| ) |
|
◆ initTasks()
ilCronCheck::initTasks |
( |
| ) |
|
|
private |
Definition at line 133 of file class.ilCronCheck.php.
References $ilSetting, and array.
Referenced by __construct().
137 $this->default_tasks =
array(
138 'ilCronValidator::check' 141 $this->possible_tasks =
array(
144 'ilCronValidator::check' =>
array(
145 'classname' =>
'ilCronValidator',
147 'location' =>
'cron',
148 'condition' => ($ilSetting->get(
'systemcheck_cron') == 1)
Create styles array
The data for the language used.
◆ runTask()
ilCronCheck::runTask |
( |
|
$task | ) |
|
|
private |
prepare task information
check if task is runable
run task
Definition at line 78 of file class.ilCronCheck.php.
References $ilLog.
Referenced by start().
86 $classlocation = $task[
'location'].
'/classes';
87 if( isset($task[
'sub_location']) && strlen($task[
'sub_location']) )
89 $classlocation .=
'/'.$task[
'sub_location'];
91 $classfile .= $classlocation.
'/class.'.$task[
'classname'].
'.php';
93 $classname = $task[
'classname'];
94 $method = $task[
'method'];
96 $condition = $task[
'condition'];
102 if( !file_exists($classfile) )
103 throw new ilException(
'class file "'.$classfile.
'" does not exist');
105 require_once($classfile);
107 if( !class_exists($classname) )
108 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);
129 $ilLog->write(
"CRON - task condition failed: ".$classname.
"::".$method);
Base class for ILIAS Exception handling.
◆ start()
Definition at line 48 of file class.ilCronCheck.php.
References $_SERVER, and runTask().
58 for($i = 4; $i <
$_SERVER[
'argc']; $i++)
60 $arg = $_SERVER[
'argv'][$i];
62 if( !isset($this->possible_tasks[$arg]) )
63 throw new ilException(
'cron-task "'.$arg.
'" is not defined');
65 $task = $this->possible_tasks[$arg];
70 else foreach($this->default_tasks as $task)
72 $task = $this->possible_tasks[$task];
Base class for ILIAS Exception handling.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
◆ $default_tasks
ilCronCheck::$default_tasks = array() |
|
private |
◆ $possible_tasks
ilCronCheck::$possible_tasks = array() |
|
private |
The documentation for this class was generated from the following file: