← Back to Baseline

MB-0047

Automated Recorded cron execution is recent (<= 900s)

MB-C08 Cron Job Reliability High

The latest recorded cron_schedule.executed_at among success, running or error jobs in the deployment database is no older than 900 seconds. No execution or a stale execution fails this policy; unreadable or malformed table evidence and future timestamps indicating clock skew are collection errors. Job success and scheduler retention are outside this criterion.

Overview

The latest recorded cron_schedule.executed_at among success, running or error jobs in the deployment database is no older than 900 seconds. No execution or a stale execution fails this policy; unreadable or malformed table evidence and future timestamps indicating clock skew are collection errors. Job success and scheduler retention are outside this criterion.

Why it Matters

Magento cron jobs must run continuously to handle indexing, order processing, emails, and cleanup. If cron stops running, jobs get stuck in “pending” and never finish. This breaks core functions, delays customer notifications, and can leave security tasks unexecuted.

A healthy cron heartbeat means jobs execute regularly without long gaps. Monitoring it ensures background processes remain stable and prevents silent failures.

Verification Steps

Manual Verification

  1. Read the latest executed_at in cron_schedule using a read-only account.
  2. Compare it with scanner UTC time, verify timestamp validity and check retention.
  3. Future timestamps or unreadable evidence leave the result unresolved.

Command / Review Sample

SELECT MAX(executed_at) AS last_execution FROM cron_schedule;
SELECT UTC_TIMESTAMP() AS database_utc;

Use the assessed Magento project and the appropriate application or read-only review account. Replace example hosts, paths and identifiers with the assessment scope; configuration and source fragments are illustrative.

Remediation / Fix Guidance

  1. Investigate and change: Inspect the recorded cron heartbeat and php bin/magento cron:run scheduler environment. Check process permissions, PHP binary, database connectivity, cron group failures and logs before restoring the scheduler.
  2. Validate the change: Confirm a new successful execution timestamp within the configured 900-second observation policy; an external scheduler needs equivalent timestamped evidence.
  3. Rerun MB-0047 against the same release, profile and relevant file/key/package scope; compare the new evidence and inspect any independent collection gaps.

Examples

Illustrative examples only. Interpret them within the current revision criterion above; missing collection evidence is unresolved, never PASS.

Fail Example

The last recorded execution is 1,800 seconds old.

Pass Example

The last recorded execution is 120 seconds old under a consistent clock; job success is assessed separately.

Scope and Evidence Limits

Rule revision: 3. Target modes: LOCAL.

The latest recorded cron_schedule.executed_at among success, running or error jobs in the deployment database is no older than 900 seconds. No execution or a stale execution fails this policy; unreadable or malformed table evidence and future timestamps indicating clock skew are collection errors. Job success and scheduler retention are outside this criterion.

This check covers only the collected observation. Missing collection scope, external controls and runtime behavior require separate evidence.

Catalog coverage describes implementation capability, not a scan outcome. An incomplete manual review cannot establish that the criterion is satisfied.

References