Cronjobs
Many features of Exponential do their work in the background, in cronjob scripts: sending notifications, running workflows, indexing content, hiding and unpublishing content on a date, checking links, maintaining the audit trail, cleaning up caches, drafts and baskets. The scripts are run by runcronjobs.php in the root of the installation, which the operating system starts at regular intervals.
The site works without it, but these features do not: no notification mail is sent, no workflow waiting for the cronjob continues, and nothing is hidden or unpublished on its date.
Parts and scripts
Scripts are grouped in cronjob parts, each run on its own schedule. A part is a group [CronjobPart-<name>] in settings/cronjob.ini; the scripts of [CronjobSettings] Scripts[] form the default part, called global in the administration. A new installation runs these parts:
| Part | Default schedule | Scripts (shipped) |
|---|---|---|
| global | every 15 minutes | unpublish, rssimport, indexcontent, hide, internal_drafts_cleanup |
| frequent | every 5 minutes | notification, workflow, contentjobs, datatablesync, audit, mailbounces, graphqlwebhooks |
| infrequent | every hour, at minute 17 | basket_cleanup, linkcheck, mailpreferences, usersessions, useraudit, exphelp |
Extensions add parts and scripts of their own in their settings/cronjob.ini.append.php (the job queue, sitemaps, newsletters and others).
Where to go next
- Configuring cronjobs: parts, scripts and schedules in cronjob.ini.
- Running cronjobs: the crontab, the shell, the console and the Setup > Cronjobs page.
- The cronjob scripts: what each shipped script does and what it needs.
- Cronjobs: running, scheduling and following them: the full guide.
In this section
- The cronjob scripts Every cronjob script of Exponential 6 with its part and settings: hide, unpublish, indexing, drafts, trash, link check, baskets, view counts and more.
- Configuring cronjobs Configuring cronjobs in cronjob.ini: the default part, cronjob parts, scripts of extensions, schedules, the crontab settings and pausing.
- Running cronjobs Running cronjobs: runcronjobs.php options, the cron: console commands, installcrontab.php, the Setup > Cronjobs page and troubleshooting.
Contributors
- Svitlana Shatokhina Commenter
- Geir Arne Waaler
- Graham Brookins Updated Maintainer
Comments
Add a comment