Documentation

WARNING

These jobs should not be installed if you bulk run jobs from the dashboard or the default 'run all jobs' path supplied by the dashboard page.

This addon installs a complementary pair of concrete5 jobs:

  • Set Maintenance Mode
  • Clear Maintenance Mode

The jobs can be individually run using cron or FlexJob Scheduler to put a site into maintenance mode and take it out of maintenance mode at set times.

The job execution string provided by the Automated Jobs dashboard page takes an optional jID parameter that can be used to specify an individual job by its ID.

For example:

http://www.mysite.com/index.php/tools/required/jobs?jID=X&auth=yyyy

Where X is the job ID and yyyy is a site specific security code.

You can alternatively use the job handle as the query parameter jHandle:

http://www.mysite.com/index.php/tools/required/jobs?jHandle=jl_set_m_m_job&auth=yyyy

For more details see the howto Run certain jobs via cron.

Cache

The cache for the concrete5 Config settings does not refresh on saving a setting from an anonymous user (such as when a job is run other than by the dashboard). This is detailed in bug report: https://www.concrete5.org/developers/bugs/5-6-0-2/out-of-date-config-values-returned/

To overcome this bug, the set and clear jobs are both configured by default to clear just the cache for the Config table. To disable this bahaviour, define the values as false in config/site.php:

MM_JOBS_CLEAR_CACHE_ON_SET_MM
MM_JOBS_CLEAR_CACHE_ON_CLEAR_MM