19declare(strict_types=1);
38 $this->
lng = $DIC->language();
39 $this->
logger = $DIC->logger()->cal();
45 return 'cal_remote_reader';
50 $this->
lng->loadLanguageModule(
'dateplaner');
51 return $this->
lng->txt(
'cal_cronjob_remote_title');
56 $this->
lng->loadLanguageModule(
'dateplaner');
57 return $this->
lng->txt(
'cal_cronjob_remote_description');
74 $a_fields[
'cal_webcal_sync'] = $a_is_active ?
75 $this->
lng->txt(
'enabled') :
76 $this->
lng->txt(
'disabled');
88 return CronJobScheduleType::IN_MINUTES;
93 if ($this->calendar_settings ===
null) {
96 return $this->calendar_settings->getWebCalSyncHours();
101 $status = JobResult::STATUS_NO_ACTION;
105 $status = JobResult::STATUS_CRASHED;
108 $reader->setUser($remoteCalendar->getRemoteUser());
109 $reader->setPass($remoteCalendar->getRemotePass());
112 $reader->import($remoteCalendar);
113 }
catch (Exception
$e) {
114 $this->
logger->warning(
'Remote Calendar: ' . $remoteCalendar->getCategoryID());
115 $this->
logger->warning(
'Reading remote calendar failed with message: ' . $e->getMessage());
118 $remoteCalendar->update();
119 $status = JobResult::STATUS_OK;
123 $result->setStatus($status);
static lookupRemoteCalendars()
getDefaultScheduleValue()
addToExternalSettingsForm(int $a_form_id, array &$a_fields, bool $a_is_active)
ilCalendarSettings $calendar_settings
hasAutoActivation()
Is to be activated on "installation", does only work for ILIAS core cron jobs.
Reader for remote ical calendars.
Stores all calendar relevant settings.
@classDescription Date and time handling
Component logger with individual log levels by component id.