19declare(strict_types=1);
 
   35        $this->
setId(
'crnmng'); 
 
   39        if ($this->mayWrite) {
 
   42        $this->
addColumn($this->
lng->txt(
'cron_job_id'), 
'title');
 
   43        $this->
addColumn($this->
lng->txt(
'cron_component'), 
'component');
 
   44        $this->
addColumn($this->
lng->txt(
'cron_schedule'), 
'schedule');
 
   45        $this->
addColumn($this->
lng->txt(
'cron_status'), 
'status');
 
   46        $this->
addColumn($this->
lng->txt(
'cron_status_info'), 
'');
 
   47        $this->
addColumn($this->
lng->txt(
'cron_result'), 
'result');
 
   48        $this->
addColumn($this->
lng->txt(
'cron_result_info'), 
'');
 
   49        $this->
addColumn($this->
lng->txt(
'cron_last_run'), 
'last_run');
 
   50        if ($this->mayWrite) {
 
   57        if ($this->mayWrite) {
 
   73                $schedule = $this->
lng->txt(
'cron_schedule_daily');
 
   77                $schedule = $this->
lng->txt(
'cron_schedule_weekly');
 
   81                $schedule = $this->
lng->txt(
'cron_schedule_monthly');
 
   85                $schedule = $this->
lng->txt(
'cron_schedule_quarterly');
 
   89                $schedule = $this->
lng->txt(
'cron_schedule_yearly');
 
   94                    $this->
lng->txt(
'cron_schedule_in_minutes'),
 
  101                    $this->
lng->txt(
'cron_schedule_in_hours'),
 
  108                    $this->
lng->txt(
'cron_schedule_in_days'),
 
  129            $status_info[] = $this->
lng->txt(
'cron_changed_by_crontab');
 
  132        return implode(
'<br />', $status_info);
 
  141                    $result = $this->
lng->txt(
'cron_result_status_invalid_configuration');
 
  145                    $result = $this->
lng->txt(
'cron_result_status_no_action');
 
  149                    $result = $this->
lng->txt(
'cron_result_status_ok');
 
  153                    $result = $this->
lng->txt(
'cron_result_status_crashed');
 
  157                    $result = $this->
lng->txt(
'cron_result_status_reset');
 
  161                    $result = $this->
lng->txt(
'cron_result_status_fail');
 
  179            $result_info[] = $this->
lng->txt(
'cro_job_rc_' . $resultCode);
 
  184        if (defined(
'DEVMODE') && DEVMODE && $resultCode) {
 
  185            $result_info[] = $resultCode;
 
  191            $result_info[] = $this->
lng->txt(
'cron_changed_by_crontab');
 
  194        return implode(
'<br />', $result_info);
 
  203            $row[
'status'] = $this->
lng->txt(
'cron_status_inactive');
 
  205                $row[
'status'] = $this->
lng->txt(
'cron_status_active');
 
  211            $row[
'last_run'] = 
null;
 
  218            $row[
'job_id'] = $entity->
getJobId();
 
  221                $row[
'job_id'] = 
'pl__' . $row[
'component'] . 
'__' . $row[
'job_id'];
 
  222                $row[
'component'] = $this->
lng->txt(
'cmps_plugin') . 
'/' . $row[
'component'];
 
  226            $row[
'description'] = $entity->
getJob()->getDescription();
 
  227            $row[
'is_manually_executable'] = $entity->
getJob()->isManuallyExecutable();
 
  228            $row[
'has_settings'] = $entity->
getJob()->hasCustomSettings();
 
  234            if ($entity->
getJob()->hasFlexibleSchedule()) {
 
  235                $row[
'editable_schedule'] = 
true;
 
  237                    $this->cronRepository->updateJobSchedule(
 
  244                $this->cronRepository->updateJobSchedule($entity->
getJob(), 
null, 
null);
 
  253    protected function fillRow(array $a_set): void
 
  255        if ($this->mayWrite) {
 
  256            $this->tpl->setVariable(
'VAL_JID', $a_set[
'job_id']);
 
  258        $this->tpl->setVariable(
'VAL_ID', $a_set[
'title']);
 
  260        if ($a_set[
'description']) {
 
  261            $this->tpl->setVariable(
'VAL_DESC', $a_set[
'description']);
 
  264        $this->tpl->setVariable(
'VAL_COMPONENT', $a_set[
'component']);
 
  265        $this->tpl->setVariable(
'VAL_SCHEDULE', $a_set[
'schedule']);
 
  266        $this->tpl->setVariable(
'VAL_STATUS', $a_set[
'status']);
 
  267        $this->tpl->setVariable(
'VAL_STATUS_INFO', $a_set[
'status_info']);
 
  268        $this->tpl->setVariable(
'VAL_RESULT', $a_set[
'result']);
 
  269        $this->tpl->setVariable(
'VAL_RESULT_INFO', $a_set[
'result_info']);
 
  270        if ($a_set[
'last_run'] > time()) {
 
  271            $a_set[
'last_run'] = $this->
lng->txt(
'cron_running_since') . 
' ' .
 
  275            if ($a_set[
'alive_ts'] !== $a_set[
'running_ts']) {
 
  276                $a_set[
'last_run'] .= 
'<br />(Ping: ' .
 
  279        } elseif ($a_set[
'last_run']) {
 
  282        $this->tpl->setVariable(
'VAL_LAST_RUN', $a_set[
'last_run'] ?: 
'-');
 
  285        if ($this->mayWrite && !$a_set[
'running_ts']) {
 
  287                $actions[] = 
'reset';
 
  288            } elseif (!$a_set[
'job_status']) {
 
  289                $actions[] = 
'activate';
 
  291                if ($a_set[
'is_manually_executable']) {
 
  294                $actions[] = 
'deactivate';
 
  298                (isset($a_set[
'editable_schedule']) && $a_set[
'editable_schedule']) ||
 
  299                (isset($a_set[
'has_settings']) && $a_set[
'has_settings'])
 
  305            foreach ($actions as $action) {
 
  306                $this->tpl->setCurrentBlock(
'action_bl');
 
  307                $this->tpl->setVariable(
 
  309                    $this->
ctrl->getLinkTarget($this->getParentObject(), $action)
 
  311                $this->tpl->setVariable(
'TXT_ACTION', $this->
lng->txt(
'cron_action_' . $action));
 
  312                $this->tpl->parseCurrentBlock();
 
getEffectiveScheduleType()
 
getEffectiveScheduleValue()
 
const STATUS_INVALID_CONFIGURATION
 
const SCHEDULE_TYPE_IN_DAYS
@depracated This will be replaced with an ENUM in ILIAS 9
 
const SCHEDULE_TYPE_IN_HOURS
@depracated This will be replaced with an ENUM in ILIAS 9
 
const SCHEDULE_TYPE_IN_MINUTES
@depracated This will be replaced with an ENUM in ILIAS 9
 
const SCHEDULE_TYPE_WEEKLY
@depracated This will be replaced with an ENUM in ILIAS 9
 
const SCHEDULE_TYPE_YEARLY
@depracated This will be replaced with an ENUM in ILIAS 9
 
const SCHEDULE_TYPE_DAILY
@depracated This will be replaced with an ENUM in ILIAS 9
 
const SCHEDULE_TYPE_QUARTERLY
@depracated This will be replaced with an ENUM in ILIAS 9
 
const SCHEDULE_TYPE_MONTHLY
@depracated This will be replaced with an ENUM in ILIAS 9
 
fillRow(array $a_set)
Standard Version of Fill Row.
 
ilCronJobRepository $cronRepository
 
formatResultInfo(ilCronJobEntity $entity)
 
formatStatusInfo(ilCronJobEntity $entity)
 
formatSchedule(ilCronJobEntity $entity, array $row)
 
formatResult(ilCronJobEntity $entity)
 
__construct(ilCronManagerGUI $a_parent_obj, ilCronJobRepository $cronRepository, string $a_parent_cmd, bool $mayWrite=false)
 
populate(ilCronJobCollection $collection)
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
 
@classDescription Date and time handling
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
addMultiCommand(string $a_cmd, string $a_text)
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
setDefaultOrderField(string $a_defaultorderfield)
 
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
 
setData(array $a_data)
Set table data.
 
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link="", bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
 
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc