ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilBookingPrefBookCron.php
Go to the documentation of this file.
1 <?php
2 
20 
28 {
29  protected ilLanguage $lng;
30 
31  public function __construct()
32  {
33  global $DIC;
34 
35  $this->lng = $DIC->language();
36  }
37 
38  public function getId(): string
39  {
40  return "book_pref_book";
41  }
42 
43  public function getTitle(): string
44  {
45  $lng = $this->lng;
46 
47  $lng->loadLanguageModule("book");
48 
49  return $lng->txt("book_pref_book_cron");
50  }
51 
52  public function getDescription(): string
53  {
54  $lng = $this->lng;
55 
56  $lng->loadLanguageModule("book");
57 
58  return $lng->txt("book_pref_book_cron_info");
59  }
60 
62  {
63  return CronJobScheduleType::SCHEDULE_TYPE_DAILY;
64  }
65 
66  public function getDefaultScheduleValue(): ?int
67  {
68  return null;
69  }
70 
71  public function hasAutoActivation(): bool
72  {
73  return true;
74  }
75 
76  public function hasFlexibleSchedule(): bool
77  {
78  return true;
79  }
80 
81  public function run(): ilCronJobResult
82  {
83  $cron_status = ilCronJobResult::STATUS_NO_ACTION;
84  $message = "";
85 
86  $auto_book = new ilBookingPrefAutoBooking();
87  $auto_book->run();
88 
89  $cron_status = ilCronJobResult::STATUS_OK;
90 
91  $cron_result = new ilCronJobResult();
92  $cron_result->setStatus($cron_status);
93 
94  return $cron_result;
95  }
96 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
loadLanguageModule(string $a_module)
Load language module.
final const STATUS_NO_ACTION
global $DIC
Definition: shib_login.php:25
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...