30 public const ID =
'ecs_task_handler';
41 $this->
logger = $DIC->logger()->wsrv();
42 $this->
lng = $DIC->language();
43 $this->
lng->loadLanguageModule(
'ecs');
45 $this->result = new \ILIAS\Cron\Job\JobResult();
50 return $this->
lng->txt(
'ecs_cron_task_scheduler');
55 return $this->
lng->txt(
'ecs_cron_task_scheduler_info');
75 return JobScheduleType::IN_HOURS;
85 $this->
logger->debug(
'Starting ecs task scheduler...');
91 $this->
logger->info(
'Starting task execution for ecs server: ' . $server->getTitle());
93 $scheduler->startTaskExecution();
94 }
catch (Exception
$e) {
95 $this->result->setStatus(\
ILIAS\Cron\Job\JobResult::STATUS_CRASHED);
96 $this->result->setMessage(
97 mb_substr(sprintf(
'Exc.: %s / %s',
$e->getMessage(),
$e->getTraceAsString()), 0, 400)
99 $this->
logger->error(
'ECS task execution failed with message: ' . $e->getMessage());
100 $this->
logger->error($e->getTraceAsString());
Class ilCronEcsTaskScheduler.
getDefaultScheduleValue()
hasAutoActivation()
Is to be activated on "installation", does only work for ILIAS core cron jobs.
const DEFAULT_SCHEDULE_VALUE
static getInstance()
Get singleton instance.
static _getInstanceByServerId($a_server_id)
get singleton instance Private access use ilECSTaskScheduler::start() or ilECSTaskScheduler::startTas...
Component logger with individual log levels by component id.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.