ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAuthDestroyExpiredSessionsCron Class Reference
+ Inheritance diagram for ilAuthDestroyExpiredSessionsCron:
+ Collaboration diagram for ilAuthDestroyExpiredSessionsCron:

Public Member Functions

 __construct ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 hasAutoActivation ()
 Is to be activated on "installation", does only work for ILIAS core cron jobs. More...
 
 hasFlexibleSchedule ()
 
 getValidScheduleTypes ()
 Returns a collection of all valid schedule types for a specific job. More...
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 isManuallyExecutable ()
 
 run ()
 
- Public Member Functions inherited from ILIAS\Cron\CronJob
 setDateTimeProvider (?\Closure $date_time_provider)
 
 isDue (?\DateTimeImmutable $last_run, ?JobScheduleType $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 (?JobScheduleType $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 ()
 
 usesLegacyForms ()
 
 getCustomConfigurationInput (\ILIAS\UI\Factory $ui_factory, \ILIAS\Refinery\Factory $factory, \ilLanguage $lng)
 
 addCustomSettingsToForm (\ilPropertyFormGUI $a_form)
 
 saveCustomConfiguration (mixed $form_data)
 
 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 ILIAS\Cron\CronJob
JobScheduleType $schedule_type = null
 
int $schedule_value = null
 
Closure $date_time_provider = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilAuthDestroyExpiredSessionsCron::__construct ( )

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

29 {
30 global $DIC;
31
32 $this->lng = $DIC->language();
33 $this->lng->loadLanguageModule('auth');
34 }
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getDefaultScheduleType()

ilAuthDestroyExpiredSessionsCron::getDefaultScheduleType ( )

Reimplemented from ILIAS\Cron\CronJob.

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

70 {
71 return \ILIAS\Cron\Job\Schedule\JobScheduleType::IN_MINUTES;
72 }

◆ getDefaultScheduleValue()

ilAuthDestroyExpiredSessionsCron::getDefaultScheduleValue ( )

Reimplemented from ILIAS\Cron\CronJob.

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

74 : ?int
75 {
76 return 1;
77 }

◆ getDescription()

ilAuthDestroyExpiredSessionsCron::getDescription ( )

Reimplemented from ILIAS\Cron\CronJob.

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

46 : string
47 {
48 return $this->lng->txt('auth_cron_destroy_expired_sessions_desc');
49 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getId()

ilAuthDestroyExpiredSessionsCron::getId ( )

Reimplemented from ILIAS\Cron\CronJob.

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

36 : string
37 {
38 return 'auth_destroy_expired_sessions';
39 }

◆ getTitle()

ilAuthDestroyExpiredSessionsCron::getTitle ( )

Reimplemented from ILIAS\Cron\CronJob.

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

41 : string
42 {
43 return $this->lng->txt('auth_cron_destroy_expired_sessions');
44 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getValidScheduleTypes()

ilAuthDestroyExpiredSessionsCron::getValidScheduleTypes ( )

Returns a collection of all valid schedule types for a specific job.

Returns
list<JobScheduleType>

Reimplemented from ILIAS\Cron\CronJob.

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

61 : array
62 {
63 return [
64 \ILIAS\Cron\Job\Schedule\JobScheduleType::IN_MINUTES,
65 \ILIAS\Cron\Job\Schedule\JobScheduleType::IN_HOURS
66 ];
67 }

◆ hasAutoActivation()

ilAuthDestroyExpiredSessionsCron::hasAutoActivation ( )

Is to be activated on "installation", does only work for ILIAS core cron jobs.

Reimplemented from ILIAS\Cron\CronJob.

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

51 : bool
52 {
53 return false;
54 }

◆ hasFlexibleSchedule()

ilAuthDestroyExpiredSessionsCron::hasFlexibleSchedule ( )

Reimplemented from ILIAS\Cron\CronJob.

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

56 : bool
57 {
58 return true;
59 }

◆ isManuallyExecutable()

ilAuthDestroyExpiredSessionsCron::isManuallyExecutable ( )

Reimplemented from ILIAS\Cron\CronJob.

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

79 : bool
80 {
81 return false;
82 }

◆ run()

ilAuthDestroyExpiredSessionsCron::run ( )

Reimplemented from ILIAS\Cron\CronJob.

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

84 : JobResult
85 {
86 $result = new JobResult();
87 $result->setStatus(JobResult::STATUS_OK);
88
89 $num_destroyed_sessions = ilSession::_destroyExpiredSessions();
91 $result->setMessage('Number of destroyed sessions: ' . $num_destroyed_sessions);
92
93 return $result;
94 }
static aggretateRaw(int $a_now)
Aggregate raw session data (older than given time)
static _destroyExpiredSessions()
Destroy expired sessions.

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

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilLanguage ilAuthDestroyExpiredSessionsCron::$lng
protected

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


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