3require_once(
"Services/Cron/classes/class.ilCronJob.php");
 
    4require_once(
"Services/Logging/classes/error/class.ilLoggingErrorSettings.php");
 
    5require_once(
"Services/Administration/classes/class.ilSetting.php");
 
    6require_once(
"Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
 
    7require_once(
"Services/Form/classes/class.ilTextInputGUI.php");
 
    8require_once(
"Services/Calendar/classes/class.ilDateTime.php");
 
    9require_once(
"Services/Cron/classes/class.ilCronJobResult.php");
 
   10require_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
   24        $this->lng->loadLanguageModule(
"logging");
 
   34        return "log_error_file_cleanup";
 
   42        return $this->lng->txt(
"log_error_file_cleanup_title");
 
   50        return $this->lng->txt(
"log_error_file_cleanup_info");
 
   99        $folder = $this->error_settings->folder();
 
  100        if (!is_dir($folder)) {
 
  102            $result->setMessage($this->lng->txt(
"log_error_path_not_configured_or_wrong"));
 
  106        $offset = $this->
settings->get(
'clear_older_then');
 
  115        foreach (
$files as $file) {
 
  116            $file_date = date(
"Y-m-d", filemtime($this->error_settings->folder() . 
"/" . $file));
 
  118            if ($file_date <= $delete_date->
get(
IL_CAL_DATE)) {
 
  119                $this->
deleteFile($this->error_settings->folder() . 
"/" . $file);
 
  131        $folder = dir(
$path);
 
  132        while ($file_name = $folder->read()) {
 
  133            if (filetype(
$path . 
"/" . $file_name) != 
"dir") {
 
  152        $offset = $this->
settings->get(
'clear_older_then');
 
  156        $clear_older_then = 
new ilNumberInputGUI($this->lng->txt(
'frm_clear_older_then'), 
'clear_older_then');
 
  157        $clear_older_then->allowDecimals(
false);
 
  158        $clear_older_then->setMinValue(1, 
true);
 
  159        $clear_older_then->setValue($offset);
 
  160        $clear_older_then->setInfo($this->lng->txt(
'frm_clear_older_then_info'));
 
  162        $a_form->
addItem($clear_older_then);
 
  171        $this->
settings->set(
'clear_older_then', $a_form->
getInput(
'clear_older_then'));
 
An exception for terminatinating execution or to throw for unit testing.
Cron job result data container.
Cron job application base class.
const SCHEDULE_TYPE_IN_DAYS
@classDescription Date and time handling
hasFlexibleSchedule()
Can the schedule be configured?boolean
addCustomSettingsToForm(ilPropertyFormGUI $a_form)
Add custom settings to form.
saveCustomSettings(ilPropertyFormGUI $a_form)
run()
Run job.ilCronJobResult
getDefaultScheduleValue()
Get schedule value.int|array
hasCustomSettings()
Has cron job any custom setting which can be edited?boolean
hasAutoActivation()
Is to be activated on "installation".boolean
const DEFAULT_VALUE_OLDER_THAN
getTitle()
Get title.string
getDefaultScheduleType()
Get schedule type.int
getDescription()
Get description.string