ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilAuthDestroyExpiredSessionsCron Class Reference
+ Inheritance diagram for ilAuthDestroyExpiredSessionsCron:
+ Collaboration diagram for ilAuthDestroyExpiredSessionsCron:

Public Member Functions

 __construct ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 hasAutoActivation ()
 
 hasFlexibleSchedule ()
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 isManuallyExecutable ()
 
 run ()
 
- Public Member Functions inherited from ilCronJob
 setDateTimeProvider (?Closure $date_time_provider)
 
 isDue (?DateTimeImmutable $last_run, ?CronJobScheduleType $schedule_type, ?int $schedule_value, bool $is_manually_executed=false)
 
 getScheduleType ()
 Get current schedule type (if flexible) More...
 
 getScheduleValue ()
 Get current schedule value (if flexible) More...
 
 setSchedule (?CronJobScheduleType $a_type, ?int $a_value)
 Update current schedule (if flexible) More...
 
 getAllScheduleTypes ()
 Get all available schedule types. More...
 
 getScheduleTypesWithValues ()
 
 getValidScheduleTypes ()
 Returns a collection of all valid schedule types for a specific job. More...
 
 isManuallyExecutable ()
 
 hasCustomSettings ()
 
 addCustomSettingsToForm (ilPropertyFormGUI $a_form)
 
 saveCustomSettings (ilPropertyFormGUI $a_form)
 
 addToExternalSettingsForm (int $a_form_id, array &$a_fields, bool $a_is_active)
 
 activationWasToggled (ilDBInterface $db, ilSetting $setting, bool $a_currently_active)
 Important: This method is (also) called from the setup process, where the constructor of an ilCronJob ist NOT executed. More...
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 hasAutoActivation ()
 Is to be activated on "installation", does only work for ILIAS core cron jobs. More...
 
 hasFlexibleSchedule ()
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 run ()
 

Protected Attributes

ilLanguage $lng
 
- Protected Attributes inherited from ilCronJob
CronJobScheduleType $schedule_type = null
 
int $schedule_value = null
 
Closure $date_time_provider = null
 

Detailed Description

Definition at line 21 of file class.ilAuthDestroyExpiredSessionsCron.php.

Constructor & Destructor Documentation

◆ __construct()

ilAuthDestroyExpiredSessionsCron::__construct ( )

Definition at line 25 of file class.ilAuthDestroyExpiredSessionsCron.php.

References $DIC, and ILIAS\Repository\lng().

26  {
27  global $DIC;
28 
29  $this->lng = $DIC->language();
30  $this->lng->loadLanguageModule('auth');
31  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ getDefaultScheduleType()

ilAuthDestroyExpiredSessionsCron::getDefaultScheduleType ( )

Definition at line 58 of file class.ilAuthDestroyExpiredSessionsCron.php.

59  {
60  return ILIAS\Cron\Schedule\CronJobScheduleType::SCHEDULE_TYPE_IN_MINUTES;
61  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getDefaultScheduleValue()

ilAuthDestroyExpiredSessionsCron::getDefaultScheduleValue ( )

Definition at line 63 of file class.ilAuthDestroyExpiredSessionsCron.php.

63  : ?int
64  {
65  return 1;
66  }

◆ getDescription()

ilAuthDestroyExpiredSessionsCron::getDescription ( )

Definition at line 43 of file class.ilAuthDestroyExpiredSessionsCron.php.

References ILIAS\Repository\lng().

43  : string
44  {
45  return $this->lng->txt('auth_cron_destroy_expired_sessions_desc');
46  }
+ Here is the call graph for this function:

◆ getId()

ilAuthDestroyExpiredSessionsCron::getId ( )

Definition at line 33 of file class.ilAuthDestroyExpiredSessionsCron.php.

33  : string
34  {
35  return 'auth_destroy_expired_sessions';
36  }

◆ getTitle()

ilAuthDestroyExpiredSessionsCron::getTitle ( )

Definition at line 38 of file class.ilAuthDestroyExpiredSessionsCron.php.

References ILIAS\Repository\lng().

38  : string
39  {
40  return $this->lng->txt('auth_cron_destroy_expired_sessions');
41  }
+ Here is the call graph for this function:

◆ hasAutoActivation()

ilAuthDestroyExpiredSessionsCron::hasAutoActivation ( )

Definition at line 48 of file class.ilAuthDestroyExpiredSessionsCron.php.

48  : bool
49  {
50  return false;
51  }

◆ hasFlexibleSchedule()

ilAuthDestroyExpiredSessionsCron::hasFlexibleSchedule ( )

Definition at line 53 of file class.ilAuthDestroyExpiredSessionsCron.php.

53  : bool
54  {
55  return true;
56  }

◆ isManuallyExecutable()

ilAuthDestroyExpiredSessionsCron::isManuallyExecutable ( )

Definition at line 68 of file class.ilAuthDestroyExpiredSessionsCron.php.

68  : bool
69  {
70  return false;
71  }

◆ run()

ilAuthDestroyExpiredSessionsCron::run ( )

Definition at line 73 of file class.ilAuthDestroyExpiredSessionsCron.php.

References ilSession\_destroyExpiredSessions(), ilSessionStatistics\aggretateRaw(), and ilCronJobResult\STATUS_OK.

74  {
75  $result = new ilCronJobResult();
76  $result->setStatus(ilCronJobResult::STATUS_OK);
77 
78  $num_destroyed_sessions = ilSession::_destroyExpiredSessions();
80  $result->setMessage('Number of destroyed sessions: ' . $num_destroyed_sessions);
81 
82  return $result;
83  }
static _destroyExpiredSessions()
Destroy expired sessions.
static aggretateRaw(int $a_now)
Aggregate raw session data (older than given time)
+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilLanguage ilAuthDestroyExpiredSessionsCron::$lng
protected

Definition at line 23 of file class.ilAuthDestroyExpiredSessionsCron.php.


The documentation for this class was generated from the following file: