4 include_once
"Services/Cron/classes/class.ilCronJob.php";
26 $GLOBALS[
'lng']->loadLanguageModule(
'sysc');
27 return $lng->txt(
'sysc_cron_empty_trash');
34 $GLOBALS[
'lng']->loadLanguageModule(
'sysc');
35 return $lng->txt(
'sysc_cron_empty_trash_desc');
40 return self::SCHEDULE_TYPE_WEEKLY;
51 self::SCHEDULE_TYPE_DAILY,
52 self::SCHEDULE_TYPE_WEEKLY,
53 self::SCHEDULE_TYPE_MONTHLY,
54 self::SCHEDULE_TYPE_QUARTERLY,
55 self::SCHEDULE_TYPE_YEARLY
93 $lng->loadLanguageModule(
'sysc');
95 include_once
'./Services/Administration/classes/class.ilSetting.php';
100 $num->
setInfo($lng->txt(
'purge_count_limit_desc'));
102 $num->setMinValue(1);
103 $num->setValue($settings->get(
'num',
''));
107 $age->
setInfo($lng->txt(
'purge_age_limit_desc'));
109 $age->setMinValue(1);
110 $age->setMaxLength(4);
112 if($settings->get(
'age',
''))
114 $age->setValue($settings->get(
'age',
''));
121 $sub_objects =
$GLOBALS[
'tree']->lookupTrashedObjectTypes();
125 foreach($sub_objects as $obj_type)
127 if(!
$GLOBALS[
'objDefinition']->isRBACObject($obj_type)
or !
$GLOBALS[
'objDefinition']->isAllowedInRepository($obj_type))
131 $options[$obj_type] = $lng->txt(
'obj_'.$obj_type);
135 $types->setValue($settings->get(
'types',
''));
149 include_once
'./Services/Administration/classes/class.ilSetting.php';
152 $settings->set(
'num', $a_form->
getInput(
'number'));
153 $settings->set(
'age',$a_form->
getInput(
'age'));
154 $settings->set(
'types',$a_form->
getInput(
'types'));
164 include_once
'./Services/SystemCheck/classes/class.ilSystemCheckTrash.php';
168 include_once
'./Services/Administration/classes/class.ilSetting.php';
171 $trash->setNumberLimit($settings->get(
'num',0));
172 $trash->setTypesLimit((
array) $settings->get(
'types'));
174 $age = $settings->get(
'age',0);
178 $date->increment(
IL_CAL_DAY, (
int) $age * -1);
179 $trash->setAgeLimit($date);
183 include_once
'./Services/Cron/classes/class.ilCronJobResult.php';;
Cron job application base class.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
addCustomSettingsToForm(ilPropertyFormGUI $form)
Add custom settings to form.
saveCustomSettings(ilPropertyFormGUI $a_form)
Save custom settings.
getDefaultScheduleValue()
if(!is_array($argv)) $options
getValidScheduleTypes()
Get all available schedule types.
Create styles array
The data for the language used.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
Cron job result data container.