ILIAS
release_8 Revision v8.19
|
Public Member Functions | |
setDateTimeProvider (?Closure $date_time_provider) | |
isDue (?DateTimeImmutable $last_run, ?int $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 (?int $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 () | |
Data Fields | |
const | SCHEDULE_TYPE_DAILY = 1 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_IN_MINUTES = 2 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_IN_HOURS = 3 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_IN_DAYS = 4 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_WEEKLY = 5 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_MONTHLY = 6 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_QUARTERLY = 7 |
This will be replaced with an ENUM in ILIAS 9 More... | |
const | SCHEDULE_TYPE_YEARLY = 8 |
This will be replaced with an ENUM in ILIAS 9 More... | |
Protected Attributes | |
int | $schedule_type = null |
int | $schedule_value = null |
Closure | $date_time_provider = null |
Private Member Functions | |
checkWeeklySchedule (DateTimeImmutable $last_run, DateTimeImmutable $now) | |
checkSchedule (?DateTimeImmutable $last_run, ?int $schedule_type, ?int $schedule_value) | |
Definition at line 21 of file class.ilCronJob.php.
ilCronJob::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.
Furthermore only few dependencies may be available in the $DIC.
ilDBInterface | $db | |
ilSetting | $setting | |
bool | $a_currently_active |
Definition at line 300 of file class.ilCronJob.php.
References getDefaultScheduleType(), getDefaultScheduleValue(), getDescription(), getId(), getTitle(), hasAutoActivation(), hasFlexibleSchedule(), ILIAS\Repository\int(), and run().
Referenced by ilCronManagerImpl\activateJob(), ilCronJobRepositoryImpl\createDefaultEntry(), and ilCronManagerImpl\deactivateJob().
ilCronJob::addCustomSettingsToForm | ( | ilPropertyFormGUI | $a_form | ) |
Definition at line 279 of file class.ilCronJob.php.
ilCronJob::addToExternalSettingsForm | ( | int | $a_form_id, |
array & | $a_fields, | ||
bool | $a_is_active | ||
) |
Definition at line 288 of file class.ilCronJob.php.
|
private |
Definition at line 82 of file class.ilCronJob.php.
References $date_time_provider, and checkWeeklySchedule().
Referenced by isDue().
|
private |
Definition at line 44 of file class.ilCronJob.php.
References ILIAS\Repository\int().
Referenced by checkSchedule().
ilCronJob::getAllScheduleTypes | ( | ) |
Get all available schedule types.
Definition at line 234 of file class.ilCronJob.php.
Referenced by getValidScheduleTypes().
|
abstract |
Referenced by activationWasToggled(), ilCronJobRepositoryImpl\createDefaultEntry(), and isDue().
|
abstract |
Referenced by activationWasToggled(), ilCronJobRepositoryImpl\createDefaultEntry(), and isDue().
|
abstract |
|
abstract |
Referenced by ilCronJobRepositoryImpl\activateJob(), activationWasToggled(), ilCronJobRepositoryImpl\createDefaultEntry(), ilCronJobRepositoryImpl\deactivateJob(), ilCronJobRepositoryImpl\getJobInstance(), ilCronJobRepositoryImpl\resetJob(), ilCronManagerImpl\runJob(), ilCronJobRepositoryImpl\updateJobResult(), and ilCronJobRepositoryImpl\updateJobSchedule().
ilCronJob::getScheduleType | ( | ) |
Get current schedule type (if flexible)
Definition at line 191 of file class.ilCronJob.php.
References $schedule_type, and hasFlexibleSchedule().
Referenced by CronJobScheduleTest\testWeeklySchedules().
ilCronJob::getScheduleTypesWithValues | ( | ) |
Definition at line 251 of file class.ilCronJob.php.
ilCronJob::getScheduleValue | ( | ) |
Get current schedule value (if flexible)
Definition at line 204 of file class.ilCronJob.php.
References $schedule_value, and hasFlexibleSchedule().
Referenced by CronJobScheduleTest\testWeeklySchedules().
|
abstract |
ilCronJob::getValidScheduleTypes | ( | ) |
Returns a collection of all valid schedule types for a specific job.
Definition at line 264 of file class.ilCronJob.php.
References getAllScheduleTypes().
Referenced by setSchedule(), and ilCronJobRepositoryImpl\updateJobSchedule().
|
abstract |
Is to be activated on "installation", does only work for ILIAS core cron jobs.
Referenced by activationWasToggled(), and ilCronJobRepositoryImpl\createDefaultEntry().
ilCronJob::hasCustomSettings | ( | ) |
Definition at line 274 of file class.ilCronJob.php.
|
abstract |
Referenced by activationWasToggled(), ilCronJobRepositoryImpl\createDefaultEntry(), getScheduleType(), getScheduleValue(), isDue(), setSchedule(), and ilCronJobRepositoryImpl\updateJobSchedule().
ilCronJob::isDue | ( | ?DateTimeImmutable | $last_run, |
?int | $schedule_type, | ||
?int | $schedule_value, | ||
bool | $is_manually_executed = false |
||
) |
Definition at line 169 of file class.ilCronJob.php.
References checkSchedule(), getDefaultScheduleType(), getDefaultScheduleValue(), and hasFlexibleSchedule().
Referenced by ilCronManagerImpl\runJob(), CronJobScheduleTest\testSchedule(), and CronJobScheduleTest\testWeeklySchedules().
ilCronJob::isManuallyExecutable | ( | ) |
Definition at line 269 of file class.ilCronJob.php.
Referenced by ilCronManagerGUI\confirm().
|
abstract |
Referenced by activationWasToggled(), ilCronDeleteInactiveUserAccounts\hasCustomSettings(), ilUserCronCheckAccounts\hasFlexibleSchedule(), and ilCronManagerImpl\runJob().
ilCronJob::saveCustomSettings | ( | ilPropertyFormGUI | $a_form | ) |
Definition at line 283 of file class.ilCronJob.php.
ilCronJob::setDateTimeProvider | ( | ?Closure | $date_time_provider | ) |
Closure():DateTimeInterface|null | $date_time_provider |
Definition at line 141 of file class.ilCronJob.php.
References $date_time_provider.
Referenced by ilCronManagerImpl\runJob().
ilCronJob::setSchedule | ( | ?int | $a_type, |
?int | $a_value | ||
) |
Update current schedule (if flexible)
int | null | $a_type | |
int | null | $a_value |
Definition at line 218 of file class.ilCronJob.php.
References getValidScheduleTypes(), and hasFlexibleSchedule().
|
protected |
Definition at line 42 of file class.ilCronJob.php.
Referenced by checkSchedule(), and setDateTimeProvider().
|
protected |
Definition at line 40 of file class.ilCronJob.php.
Referenced by getScheduleType().
|
protected |
Definition at line 41 of file class.ilCronJob.php.
Referenced by getScheduleValue().
const ilCronJob::SCHEDULE_TYPE_DAILY = 1 |
This will be replaced with an ENUM in ILIAS 9
Definition at line 24 of file class.ilCronJob.php.
Referenced by ilCronManagerTableFilterMediator\filter(), ilCronManagerTableGUI\formatSchedule(), ilCronManagerGUI\getScheduleTypeFormElementName(), ilCronDeleteInactiveUserAccounts\getTimeDifferenceBySchedule(), CronJobScheduleTest\jobProvider(), CronJobEntityTest\testEffectiveScheduleCanBeDetermined(), and ilCronFinishUnfinishedTestPassesTest\testGetDefaultScheduleType().
const ilCronJob::SCHEDULE_TYPE_IN_DAYS = 4 |
This will be replaced with an ENUM in ILIAS 9
Definition at line 30 of file class.ilCronJob.php.
Referenced by ilCronManagerTableFilterMediator\filter(), ilCronManagerTableGUI\formatSchedule(), ilCronManagerGUI\getScheduleTypeFormElementName(), ilCronManagerGUI\getScheduleValueFormElementName(), ilCronDeleteInactiveUserAccounts\getTimeDifferenceBySchedule(), ilCronManagerGUI\hasScheduleValue(), CronJobScheduleTest\jobProvider(), and ilCronDeleteInactiveUserAccounts\saveCustomSettings().
const ilCronJob::SCHEDULE_TYPE_IN_HOURS = 3 |
This will be replaced with an ENUM in ILIAS 9
Definition at line 28 of file class.ilCronJob.php.
Referenced by ilCronManagerTableFilterMediator\filter(), ilCronManagerTableGUI\formatSchedule(), ilCronManagerGUI\getScheduleTypeFormElementName(), ilCronManagerGUI\getScheduleValueFormElementName(), ilCronDeleteInactiveUserAccounts\getTimeDifferenceBySchedule(), ilCronManagerGUI\hasScheduleValue(), CronJobScheduleTest\jobProvider(), and CronJobEntityTest\testEffectiveScheduleCanBeDetermined().
const ilCronJob::SCHEDULE_TYPE_IN_MINUTES = 2 |
This will be replaced with an ENUM in ILIAS 9
Definition at line 26 of file class.ilCronJob.php.
Referenced by ilCronManagerTableFilterMediator\filter(), ilCronManagerTableGUI\formatSchedule(), ilCronManagerGUI\getScheduleTypeFormElementName(), ilCronManagerGUI\getScheduleValueFormElementName(), ilCronDeleteInactiveUserAccounts\getTimeDifferenceBySchedule(), ilCronManagerGUI\hasScheduleValue(), CronJobScheduleTest\jobProvider(), and CronJobEntityTest\testEffectiveScheduleCanBeDetermined().
const ilCronJob::SCHEDULE_TYPE_MONTHLY = 6 |
This will be replaced with an ENUM in ILIAS 9
Definition at line 34 of file class.ilCronJob.php.
Referenced by ilCronManagerTableFilterMediator\filter(), ilCronManagerTableGUI\formatSchedule(), ilCronManagerGUI\getScheduleTypeFormElementName(), ilCronDeleteInactiveUserAccounts\getTimeDifferenceBySchedule(), CronJobScheduleTest\jobProvider(), and ilCronDeleteInactiveUserAccounts\saveCustomSettings().
const ilCronJob::SCHEDULE_TYPE_QUARTERLY = 7 |
This will be replaced with an ENUM in ILIAS 9
Definition at line 36 of file class.ilCronJob.php.
Referenced by ilCronManagerTableFilterMediator\filter(), ilCronManagerTableGUI\formatSchedule(), ilCronManagerGUI\getScheduleTypeFormElementName(), ilCronDeleteInactiveUserAccounts\getTimeDifferenceBySchedule(), CronJobScheduleTest\jobProvider(), and ilCronDeleteInactiveUserAccounts\saveCustomSettings().
const ilCronJob::SCHEDULE_TYPE_WEEKLY = 5 |
This will be replaced with an ENUM in ILIAS 9
Definition at line 32 of file class.ilCronJob.php.
Referenced by ilCronManagerTableFilterMediator\filter(), ilCronManagerTableGUI\formatSchedule(), ilCronManagerGUI\getScheduleTypeFormElementName(), ilCronDeleteInactiveUserAccounts\getTimeDifferenceBySchedule(), CronJobScheduleTest\jobProvider(), ilCronDeleteInactiveUserAccounts\saveCustomSettings(), and CronJobScheduleTest\weeklyScheduleProvider().
const ilCronJob::SCHEDULE_TYPE_YEARLY = 8 |
This will be replaced with an ENUM in ILIAS 9
Definition at line 38 of file class.ilCronJob.php.
Referenced by ilCronManagerTableFilterMediator\filter(), ilCronManagerTableGUI\formatSchedule(), ilCronManagerGUI\getScheduleTypeFormElementName(), ilCronDeleteInactiveUserAccounts\getTimeDifferenceBySchedule(), CronJobScheduleTest\jobProvider(), and ilCronDeleteInactiveUserAccounts\saveCustomSettings().