ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilBookingPrefBookCron.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once "Services/Cron/classes/class.ilCronJob.php";
6 
14 {
18  protected $lng;
19 
23  public function __construct()
24  {
25  global $DIC;
26 
27  $this->lng = $DIC->language();
28  }
29 
30  public function getId()
31  {
32  return "book_pref_book";
33  }
34 
35  public function getTitle()
36  {
37  $lng = $this->lng;
38 
39  $lng->loadLanguageModule("book");
40 
41  return $lng->txt("book_pref_book_cron");
42  }
43 
44  public function getDescription()
45  {
46  $lng = $this->lng;
47 
48  $lng->loadLanguageModule("book");
49 
50  return $lng->txt("book_pref_book_cron_info");
51  }
52 
53  public function getDefaultScheduleType()
54  {
55  return self::SCHEDULE_TYPE_DAILY;
56  }
57 
58  public function getDefaultScheduleValue()
59  {
60  return;
61  }
62 
63  public function hasAutoActivation()
64  {
65  return true;
66  }
67 
68  public function hasFlexibleSchedule()
69  {
70  return true;
71  }
72 
73  public function run()
74  {
75  $cron_status = ilCronJobResult::STATUS_NO_ACTION;
76  $message = "";
77 
78  $auto_book = new ilBookingPrefAutoBooking();
79  $auto_book->run();
80 
81  $cron_status = ilCronJobResult::STATUS_OK;
82 
83  $cron_result = new ilCronJobResult();
84  $cron_result->setStatus($cron_status);
85 
86  return $cron_result;
87  }
88 }
Cron job application base class.
Automatic booking of overdue pools using booking by preference.
$DIC
Definition: xapitoken.php:46
$message
Definition: xapiexit.php:14
Cron job result data container.