Lesson 4.3: The cronjob console
Support staff often have no shell on a customer's server. The administration page Setup, Cronjobs shows what the crontab runs, runs parts, follows their output and pauses them during a maintenance window. This lesson teaches the page, what it needs from the hosting platform's PHP, and how to decide who may use it.
At a glance
| Course | Hosting and operations |
| Module | Module 4: Deploying and cron |
| Duration | 40 minutes (15 presenting, 25 exercise) |
| Level | Intermediate |
| Audience | Hosting support staff and site administrators |
| Prerequisites | Lesson 4.2; an administrator account on the learner's training installation |
Learning objectives
After this lesson, learners can:
- read the page's sections and tell whether a part is scheduled, paused or not activated;
- run a part for a chosen site and follow its output;
- pause and resume a part with a note, and explain who is affected by a pause;
- name what the page needs from the platform (a PHP command-line binary,
proc_open,exec,posix_kill); - explain why some parts are blocked and who should get the
setup/managecronjobspolicy.
Trainer's notes
How to present it
Source: The cronjob console, Cronjobs console and Pausing cronjob parts.
- A tour (5 minutes). On the admin4 design the page Cronjobs has the sections Overview, Now, Run and filter, Cronjob parts, Available but not activated, Recent runs, Pauses, Crontab and Output. The Crontab section shows what the crontab holds and suggests lines for parts nothing runs.
- Running (3 minutes). Run starts a part or a script for the site chosen in the site list next to it; Output
follows it live; Stop running job sends
SIGTERMso the script can release its lock. Only one job started from the page runs at a time. - Pausing (4 minutes). A paused part is left out by
runcronjobs.phpwhoever starts it: the crontab, the console commands or the page. The notice names since when, by whom and why. Skipped runs are logged incronjob_skipped.log. On several servers the pause files must be on shared storage. - Platform and permissions (3 minutes). The page needs a PHP CLI binary (
[AdminSettings] PhpCliPathon hosts with several PHP versions),proc_open,execandposix_kill, and says what is missing instead of failing.cluster_maintenanceandunlockare inForbiddenParts[]. The policysetup/managecronjobsbelongs to the Administrator role in a new installation; decide per plan who else gets it.
Common questions
A part shows Not scheduled although it runs. The page reads the crontab of the user the web server runs as; a crontab under root or a deploy user is not shown. Move the crontab to the site's user.
Does maintenance mode pause cron? No. Pause the parts that must not run during the window.
Stop running job fails with "could not be signalled". The job runs as a different system user than the web server that answered, for example Velocity workers and PHP-FPM as different users. Stop it from a shell.
Do queue workers obey a pause? Queue workers that run as a systemd service are not cronjobs and keep working.
Pitfalls
- Running heavy parts on a shared training server. Each learner runs parts on their own installation only.
- Forgetting to resume. End the exercise with every part resumed and check the Pauses section.
- Labels differ by design. This lesson describes the admin4 design; on other designs check the labels first.
Hands-on exercise
Use your own training installation, signed in to its administration as an administrator.
- Open Setup, then Cronjobs.
- In Overview and Cronjob parts, find the parts Frequent and Global and note whether each is scheduled and when it last ran.
- Open the section Crontab and compare it with the crontab you installed in lesson 4.2.
- Under Run and filter, choose your public site in the site list and press Run for the part Frequent.
- Follow the job in Output until it ends, then find it in Recent runs with its result and duration.
- Press Pause for Frequent, and write a note such as
Training: pause testin Note for a pause or resume (optional). - In a terminal, run
php runcronjobs.php -s <siteaccess> frequentand read the notice it prints. - Find the skipped run in the log directory's
cronjob_skipped.log(for examplels var/log/andtailthe file). - Back on the page, resume Frequent and check that Pauses lists no paused part.
- Find a part listed under Available but not activated and read what its scripts do.
Expected result
- Step 5: the run appears in Recent runs with its result.
- Step 7 prints a notice that the part is paused, with the time, the user and the note.
- Step 8:
cronjob_skipped.loghas a line for the skipped run. - Step 9: no part is paused.
- The trainer checks by asking each learner to read the notice of step 7 aloud.

Quiz
- Which runs does a pause on the cronjob page hold back?
A. only runs started from the page B. only crontab runs C. every run of
runcronjobs.php, whoever starts it D. only the queue workers - A part runs from root's crontab, but the page says it is not scheduled. Why?
- Which PHP functions must the platform allow for the page to start and stop jobs?
- Why are
cluster_maintenanceandunlockblocked on the page? - Which policy gives access to the page?
Answers
- C. A paused part is left out whoever starts it (Pausing cronjob parts).
- The page reads the crontab of the user the web server runs as, not root's.
proc_opento start,execto read the crontab,posix_killto stop.- Both are destructive and belong to an administrator on a shell, not to a button (
ForbiddenParts[]). setup/managecronjobs.
Further reading
- The cronjob console: platform needs and support scenarios.
- Cronjobs: running, scheduling and following them: the user guide.
- Pausing cronjob parts: how pauses are stored and shared.
- Maintenance mode: windows and cron together.
Related pages
- Module 4: Deploying and cron
- Hosting and operations: course overview
- Trainers: start here
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.