Cron can look perfectly healthy, with every job reporting success, while each job starts long after its scheduled time. Order emails, index updates and queue consumers all run that much later.

Measure the delay

SELECT job_code,
       ROUND(AVG(TIMESTAMPDIFF(SECOND, scheduled_at, executed_at))) AS avg_delay_s
  FROM cron_schedule
 WHERE executed_at IS NOT NULL
   AND scheduled_at > DATE_SUB(UTC_TIMESTAMP(), INTERVAL 1 DAY)
 GROUP BY job_code ORDER BY avg_delay_s DESC LIMIT 15;

A healthy store shows delays of a few seconds. Delays of many minutes mean jobs are falling behind.

Why it happens

  • One slow job blocks its group. Jobs in the same cron group run one after another, so a long job delays everything behind it.
  • Skipped minutes add up. When a cron run takes longer than a minute, or the server restarts, every-minute jobs fall one run behind. Magento runs only one overdue run per job each time, so they can stay behind for a long time.
  • A huge cron_schedule table makes every run slower (see cleaning cron_schedule).

How to fix it

  1. In Stores > Configuration > Advanced > System > Cron, set Use Separate Process to Yes for busy groups, especially index and consumers, so slow jobs stop blocking the default group.
  2. Find the slow jobs. Look for cron runs taking more than a minute in var/log/magento.cron.log, and check which jobs run longest in cron_schedule.
  3. Clean up old history, so each cron run starts faster.

Catch it automatically

MageMonitor checks for this every few minutes as part of its Cron Health checks, and alerts you by email, Slack or webhook the moment it appears, with the exact commands to fix it. See MageMonitor for Magento 2.

Related fixes