Janitor
Allows an app to program tasks to be executed periodically.
See the Janitor guide to learn how to work with the Janitor module.
Constants
JANITORTASK_EXECUTION_RETURN_WARNINGReturn code for JanitorTask run when task returned a warning.JANITORTASK_EXECUTION_RETURN_ERRORReturn code for JanitorTask run when task returned an error.JANITORTASK_EXECUTION_RETURN_CRITICALReturn code for JanitorTask run when task returned a critical error.JANITORTASK_EXECUTION_RETURN_OKReturn code for JanitorTask run when task was executed without errors.
JANITORTASK_EXECUTION_PERIODICITY_ONLY_MANUALThe task can only be executed when calling the Janitor run process with an specific task parameter. It won't be executed on regular "all-tasks" calls to Janitor.JANITORTASK_EXECUTION_PERIODICITY_ALWAYSThe task must be executed every time Janitor run is called.JANITORTASK_EXECUTION_PERIODICITY_EACH_SECONDSThe task must be executed every specified seconds. Seconds specified inperiodicityEachSecondsconfig key.JANITORTASK_EXECUTION_PERIODICITY_MINUTESThe task must be executed on the given minutes of each hour. Desired minutes are specified as an array in theperiodicityMinutesconfig key with the syntax:[0, 15, 30, 45]JANITORTASK_EXECUTION_PERIODICITY_HOURSThe task must be executed on the given hours of each day. Desired hours/minute are specified as an array in theperiodicityHoursconfig key with the syntax:["hour:minute", "hour:minute", "hour:minute"]JANITORTASK_EXECUTION_PERIODICITY_DAYSOFMONTHThe task must be executed on the given days of each month. Desired days/hour/minute are specified as an array in theperiodicityDaysOfMonthconfig key with the syntax:["day@hour:minute", "day@hour:minute", "day@hour:minute"](Take into account days of month that do not exist)
Configuration
logDatabaseProviderNameThe name of the DatabaseProvider to use for storing Janitor log. Defaults tomain.logTableNameThe name of the table used to store Janitor log. Defaults tocherrycake_janitor_logcoreJanitorTasksAn array of names of the Cherrycake core JanitorTask classes to run. Defaults to an array with the following elements:JanitorTaskJanitorPurgeJanitorTaskSystemLogPurgeJanitorTaskSystemLogCommitJanitorTaskSessionPurgeJanitorTaskStatsCommitJanitorTaskLogCommit
appJanitorTasksAn array of names of App JanitorTask classes to run.
Last updated
Was this helpful?