ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilLTICronOutcomeService.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
12{
16 public function getDefaultScheduleType()
17 {
19 }
20
24 public function getDefaultScheduleValue()
25 {
26 return 1;
27 }
28
32 public function getId()
33 {
34 return 'lti_outcome';
35 }
36
40 public function hasAutoActivation()
41 {
42 return false;
43 }
44
48 public function hasFlexibleSchedule()
49 {
50 return true;
51 }
52
56 public function getTitle()
57 {
58 global $DIC;
59 $DIC->language()->loadLanguageModule('lti');
60 return $DIC->language()->txt('lti_cron_title');
61 }
62
66 public function getDescription()
67 {
68 global $DIC;
69 $DIC->language()->loadLanguageModule('lti');
70 return $DIC->language()->txt('lti_cron_title_desc');
71 }
72
76 public function run()
77 {
78 global $DIC;
79
81
82 $info = ilCronManager::getCronJobData($this->getId());
83 $last_ts = $info['job_status_ts'];
84 if (!$last_ts) {
85 $last_ts = time() - 24 * 3600;
86 }
87 $since = new ilDateTime($last_ts, IL_CAL_UNIX);
88
89
90 $result = new \ilCronJobResult();
91 $result->setStatus($status);
94
95 return $result;
96 }
97}
$result
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_UNIX
Cron job application base class.
const SCHEDULE_TYPE_DAILY
static getCronJobData($a_id=null, $a_include_inactive=true)
Get cron job configuration/execution data.
@classDescription Date and time handling
static handleCronUpdate(ilDateTime $since)
hasFlexibleSchedule()
Can the schedule be configured?boolean
hasAutoActivation()
Is to be activated on "installation".boolean
getDefaultScheduleValue()
Get schedule value.int|array
global $DIC
Definition: goto.php:24