ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilBookingPrefBookCron.php
Go to the documentation of this file.
1<?php
2
22
30{
31 protected ilLanguage $lng;
32
33 public function __construct()
34 {
35 global $DIC;
36
37 $this->lng = $DIC->language();
38 }
39
40 public function getId(): string
41 {
42 return "book_pref_book";
43 }
44
45 public function getTitle(): string
46 {
48
49 $lng->loadLanguageModule("book");
50
51 return $lng->txt("book_pref_book_cron");
52 }
53
54 public function getDescription(): string
55 {
57
58 $lng->loadLanguageModule("book");
59
60 return $lng->txt("book_pref_book_cron_info");
61 }
62
64 {
65 return JobScheduleType::DAILY;
66 }
67
68 public function getDefaultScheduleValue(): ?int
69 {
70 return null;
71 }
72
73 public function hasAutoActivation(): bool
74 {
75 return true;
76 }
77
78 public function hasFlexibleSchedule(): bool
79 {
80 return true;
81 }
82
83 public function run(): JobResult
84 {
85 $cron_status = JobResult::STATUS_NO_ACTION;
86 $message = "";
87
88 $auto_book = new ilBookingPrefAutoBooking();
89 $auto_book->run();
90
91 $cron_status = JobResult::STATUS_OK;
92
93 $cron_result = new JobResult();
94 $cron_result->setStatus($cron_status);
95
96 return $cron_result;
97 }
98}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
hasAutoActivation()
Is to be activated on "installation", does only work for ILIAS core cron jobs.
language handling
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
global $DIC
Definition: shib_login.php:26
$message
Definition: xapiexit.php:31