ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCronCheck Class Reference
+ Collaboration diagram for ilCronCheck:

Public Member Functions

 ilCronCheck ()
 start ()

Private Member Functions

 runTask ($task)
 initTasks ()

Private Attributes

 $possible_tasks = array()
 $default_tasks = array()

Detailed Description

Definition at line 34 of file class.ilCronCheck.php.

Member Function Documentation

ilCronCheck::ilCronCheck ( )

Definition at line 39 of file class.ilCronCheck.php.

References $ilLog, and initTasks().

{
global $ilLog;
$this->log = $ilLog;
$this->initTasks();
}

+ Here is the call graph for this function:

ilCronCheck::initTasks ( )
private

This task entry refers to a method that does not exist! When the method will be implemented it has to be non static!

Definition at line 118 of file class.ilCronCheck.php.

References ilDiskQuotaActivationChecker\_isActive(), ilDiskQuotaActivationChecker\_isReminderMailActive(), ilDiskQuotaActivationChecker\_isSummaryMailActive(), and ilUserDefinedInvoiceNumber\_isUDInvoiceNumberActive().

Referenced by ilCronCheck().

{
global $ilias;
require_once('Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php');
require_once('Services/Payment/classes/class.ilUserDefinedInvoiceNumber.php');
$this->default_tasks = array(
'ilLDAPCronSynchronization::start',
'ilCronCheckUserAccounts::check',
'ilLuceneIndexer::index',
'ilCronLinkCheck::check',
'ilCronWebResourceCheck::check',
'ilCronForumNotification::sendNotifications',
'ilCronMailNotification::sendNotifications',
'ilCronValidator::check',
'ilCronDiskQuotaCheck::updateDiskUsageStatistics',
'ilCronDiskQuotaCheck::sendReminderMails',
// This entry refers to a task that is not completely implemented
#'ilPaymentShoppingCart::__deleteExpiredSessionsPSC',
'ilCronDeleteInactiveUserAccounts::run',
'ilCronPaymentNotification::sendNotifications',
'ilCronCourseGroupNotification::check',
'ilCronPaymentUDInvoiceNumberReset::check'
);
$this->possible_tasks = array(
'ilLDAPCronSynchronization::start' => array(
'classname' => 'ilLDAPCronSynchronization',
'method' => 'start',
'location' => 'Services/LDAP',
'condition' => true
),
// Check user accounts if enabled in settings
'ilCronCheckUserAccounts::check' => array(
'classname' => 'ilCronCheckUserAccounts',
'method' => 'check',
'location' => 'cron',
'condition' => $ilias->getSetting('cron_user_check')
),
// Start lucene indexer
'ilLuceneIndexer::index' => array(
'classname' => 'ilLuceneIndexer',
'method' => 'index',
'location' => 'Services/Search',
'sub_location' => 'Lucene',
'condition' => $ilias->getSetting("cron_lucene_index")
),
// Start Link check
'ilCronLinkCheck::check' => array(
'classname' => 'ilCronLinkCheck',
'method' => 'check',
'location' => 'cron',
'condition' => $ilias->getSetting("cron_link_check")
),
// Start web resource check
'ilCronWebResourceCheck::check' => array(
'classname' => 'ilCronWebResourceCheck',
'method' => 'check',
'location' => 'cron',
'condition' => $ilias->getSetting("cron_web_resource_check")
),
// Start sending forum notifications
'ilCronForumNotification::sendNotifications' => array(
'classname' => 'ilCronForumNotification',
'method' => 'sendNotifications',
'location' => 'cron',
'condition' => ($ilias->getSetting('forum_notification') == 2)
),
// Start sending mail notifications
'ilCronMailNotification::sendNotifications' => array(
'classname' => 'ilCronMailNotification',
'method' => 'sendNotifications',
'location' => 'cron',
'condition' => ($ilias->getSetting('mail_notification') == 1)
),
// Start System Check
'ilCronValidator::check' => array(
'classname' => 'ilCronValidator',
'method' => 'check',
'location' => 'cron',
'condition' => ($ilias->getSetting('systemcheck_cron') == 1)
),
// Start Disk Quota Usage Statistics
'ilCronDiskQuotaCheck::updateDiskUsageStatistics' => array(
'classname' => 'ilCronDiskQuotaCheck',
'method' => 'updateDiskUsageStatistics',
'location' => 'cron',
),
// Send Disk Quota Reminder Mails
'ilCronDiskQuotaCheck::sendReminderMails' => array(
'classname' => 'ilCronDiskQuotaCheck',
'method' => 'sendReminderMails',
'location' => 'cron',
),
// Send Disk Quota Summary Mails
'ilCronDiskQuotaCheck::sendSummaryMails' => array(
'classname' => 'ilCronDiskQuotaCheck',
'method' => 'sendSummaryMails',
'location' => 'cron',
),
#// Start Shopping Cart Check
#'ilPaymentShoppingCart::__deleteExpiredSessionsPSC' => array(
# 'classname' => 'ilPaymentShoppingCart',
# 'method' => '__deleteExpiredSessionsPSC',
# 'location' => 'Services/Payment',
# 'condition' => true
#),
// Delete Inactive User Accounts
'ilCronDeleteInactiveUserAccounts::run' => array(
'classname' => 'ilCronDeleteInactiveUserAccounts',
'method' => 'run',
'location' => 'Services/User',
'condition' => $ilias->getSetting('cron_inactive_user_delete', 0)
),
// Start sending Payment "Buy Extension" Reminder
'ilCronPaymentNotification::sendNotifications' => array(
'classname' => 'ilCronPaymentNotification',
'method' => 'sendNotifications',
'location' => 'cron',
'condition' => ($ilias->getSetting('payment_notifications') == 1)
),
// Start course group notification check
'ilCronCourseGroupNotification::check' => array(
'classname' => 'ilCronCourseGroupNotification',
'method' => 'sendNotifications',
'location' => 'cron',
'condition' => $ilias->getSetting("crsgrp_ntf")
),
// Reset payment incremental invoice number
'ilCronPaymentUDInvoiceNumberReset::check' => array(
'classname' => 'ilCronPaymentUDInvoiceNumberReset',
'method' => 'check',
'location' => 'cron',
)
);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCronCheck::runTask (   $task)
private

prepare task information

check if task is runable

run task

Definition at line 73 of file class.ilCronCheck.php.

Referenced by start().

{
$classlocation = $task['location'].'/classes';
if( isset($task['sub_location']) && strlen($task['sub_location']) )
{
$classlocation .= '/'.$task['sub_location'];
}
$classfile .= $classlocation.'/class.'.$task['classname'].'.php';
$classname = $task['classname'];
$method = $task['method'];
$condition = $task['condition'];
if( !file_exists($classfile) )
throw new ilException('class file "'.$classfile.'" does not exist');
require_once($classfile);
if( !class_exists($classname) )
throw new ilException('class "'.$classname.'" does not exist');
if( !method_exists($classname, $method) )
throw new ilException('method "'.$classname.'::'.$method.'()" does not exist');
if($condition)
{
$task = new $classname;
$task->$method();
}
}

+ Here is the caller graph for this function:

ilCronCheck::start ( )

Definition at line 48 of file class.ilCronCheck.php.

References $ilSetting, and runTask().

{
global $ilSetting;
$ilSetting->set('last_cronjob_start_ts', time());
if( $_SERVER['argc'] > 4 ) for($i = 4; $i < $_SERVER['argc']; $i++)
{
$arg = $_SERVER['argv'][$i];
if( !isset($this->possible_tasks[$arg]) )
throw new ilException('cron-task "'.$arg.'" is not defined');
$task = $this->possible_tasks[$arg];
$this->runTask($task);
}
else foreach($this->default_tasks as $task)
{
$task = $this->possible_tasks[$task];
$this->runTask($task);
}
}

+ Here is the call graph for this function:

Field Documentation

ilCronCheck::$default_tasks = array()
private

Definition at line 37 of file class.ilCronCheck.php.

ilCronCheck::$possible_tasks = array()
private

Definition at line 36 of file class.ilCronCheck.php.


The documentation for this class was generated from the following file: