Cherrycake
ExamplesGithub
version 0.x
version 0.x
  • Introduction
  • Status
  • Changelog
  • Migration
  • Architecture
    • Basics
    • Modules
    • Classes
    • Lifecycle
      • Deep lifecycle
    • Performance
    • Security
    • Patterns
      • Files structure
    • Items
    • Server requirements
  • Guide
    • Getting started
      • Skeleton start
      • Docker start
    • Modules guide
    • Classes guide
    • Actions guide
      • Complex actions
      • Variable path components
      • Accept GET or POST parameters
      • Getting the URL of an action
      • Cached actions
      • Brute force attacks
    • Patterns guide
      • Passing variables to a pattern
      • Nested patterns
      • Cached patterns
    • Cache guide
      • Time To Live
      • Using cache
      • Lists
      • Queues
      • Pools
    • Database guide
      • Basic queries
      • Prepared queries
      • Cached queries
      • Cache key naming
      • Removing queries from cache
    • Items guide
      • Item cache
      • Item lists
      • Items custom filters
      • Items custom ordering
      • Mixing filters and ordering
      • Items with relationships
      • Items cache
    • HtmlDocument guide
    • Css and Javascript guide
      • Modules injecting CSS and JavaScript
    • Session guide
    • Login guide
      • Creating a complete login workflow
    • Locale guide
      • Multilingual texts
      • Domain based site localization
    • Log guide
      • Loading Log events from the database
    • Stats guide
      • Stats events with additional dimensions
      • Loading Stats events from the database
    • Janitor guide
      • Janitor tasks configuration files
    • Command line interface
    • Debugging
  • Reference
    • Core modules
      • Actions
        • Actions methods
      • Browser
      • Cache
        • Cache methods
      • Css
        • Css methods
      • Database
      • Email
      • Errors
      • HtmlDocument
        • HtmlDocument methods
      • ItemAdmin
      • Janitor
        • Janitor methods
      • Javascript
        • Javascript methods
      • Locale
        • Locale methods
      • Log
        • Log methods
      • Login
        • Login methods
      • Output
        • Output methods
      • Patterns
        • Patterns methods
      • Security
        • Security methods
      • Session
        • Session methods
      • Stats
        • Stats methods
      • SystemLog
      • TableAdmin
      • Validate
    • Core classes
      • Action
        • Action methods
        • Action properties
      • AjaxResponseJson
      • BasicObject
        • BasicObject methods
      • CacheProvider
        • CacheProvider methods
      • Color
      • DatabaseProvider
        • DatabaseProvider methods
      • DatabaseResult
        • DatabaseResult methods
        • DatabaseResult properties
      • DatabaseRow
      • Engine
        • Engine methods
        • Engine properties
      • Gradient
      • Item
        • Item methods
        • Item properties
      • Items
        • Items methods
        • Items properties
      • Image
      • JanitorTask
        • JanitorTask methods
        • JanitorTask properties
      • LogEvent
        • LogEvent methods
        • LogEvent Properties
      • LogEvents
        • LogEvents methods
      • Module
        • Module methods
        • Module properties
      • Response
      • Request
        • Request methods
      • RequestParameter
        • RequestParameter methods
      • RequestPathComponent
        • RequestPathComponent methods
      • Result
      • StatsEvent
        • StatsEvent properties
      • StatsEvents
        • StatsEvents methods
      • SystemLogEvent
        • SystemLogEvent methods
        • SystemLogEvent properties
      • SystemLogEvents
        • SystemLogEvents methods
  • Code conventions
  • License
  • Extras
Powered by GitBook
On this page
  • Constants
  • Configuration

Was this helpful?

  1. Reference
  2. Core modules

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_WARNING Return code for JanitorTask run when task returned a warning.

  • JANITORTASK_EXECUTION_RETURN_ERROR Return code for JanitorTask run when task returned an error.

  • JANITORTASK_EXECUTION_RETURN_CRITICAL Return code for JanitorTask run when task returned a critical error.

  • JANITORTASK_EXECUTION_RETURN_OK Return code for JanitorTask run when task was executed without errors.

  • JANITORTASK_EXECUTION_PERIODICITY_ONLY_MANUAL The 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_ALWAYS The task must be executed every time Janitor run is called.

  • JANITORTASK_EXECUTION_PERIODICITY_EACH_SECONDS The task must be executed every specified seconds. Seconds specified in periodicityEachSeconds config key.

  • JANITORTASK_EXECUTION_PERIODICITY_MINUTES The task must be executed on the given minutes of each hour. Desired minutes are specified as an array in the periodicityMinutes config key with the syntax: [0, 15, 30, 45]

  • JANITORTASK_EXECUTION_PERIODICITY_HOURS The task must be executed on the given hours of each day. Desired hours/minute are specified as an array in the periodicityHours config key with the syntax: ["hour:minute", "hour:minute", "hour:minute"]

  • JANITORTASK_EXECUTION_PERIODICITY_DAYSOFMONTH The task must be executed on the given days of each month. Desired days/hour/minute are specified as an array in the periodicityDaysOfMonth config key with the syntax: ["day@hour:minute", "day@hour:minute", "day@hour:minute"] (Take into account days of month that do not exist)

Configuration

  • logDatabaseProviderName The name of the DatabaseProvider to use for storing Janitor log. Defaults to main.

  • logTableName The name of the table used to store Janitor log. Defaults to cherrycake_janitor_log

  • coreJanitorTasks An array of names of the Cherrycake core JanitorTask classes to run. Defaults to an array with the following elements:

    • JanitorTaskJanitorPurge

    • JanitorTaskSystemLogPurge

    • JanitorTaskSystemLogCommit

    • JanitorTaskSessionPurge

    • JanitorTaskStatsCommit

    • JanitorTaskLogCommit

  • appJanitorTasks An array of names of App JanitorTask classes to run.

PreviousItemAdminNextJanitor methods

Last updated 5 months ago

Was this helpful?