← Back to Baseline

Why it Matters

Magento schedules hundreds of cron jobs for indexing, order processing, email sending, cache cleanup, and more. If too many jobs remain pending or delayed, it means the cron system is overloaded or broken. This can lead to stuck orders, delayed notifications, and poor store stability.

Monitoring the cron backlog ensures that issues are detected early. A defined threshold (for example, no more than a few pending jobs at any time) helps maintain a healthy background processing pipeline.

Verification Steps

Database check

# Query pending cron jobs
SELECT COUNT(*) FROM cron_schedule WHERE status='pending';

# Expected: only a small number of jobs pending
# (large counts mean backlog problem)

Magento CLI

bin/magento cron:check
# Should not report major delays

Remediation / Fix Guidance

  1. Investigate high backlog:
    • Check PHP-FPM workers or CLI processes for resource limits.
    • Inspect cron_schedule table for jobs stuck in pending or error.
    • Review server load and database performance.
  2. Increase parallel cron runners if needed (using Supervisord or multiple crontab workers).
  3. Fix broken custom modules that create heavy or long-running cron jobs.
  4. Set up monitoring to alert if pending job count exceeds safe thresholds.

Examples

Fail Example
# Backlog observed
SELECT COUNT(*) FROM cron_schedule WHERE status='pending';
count = 850
# Too many jobs → FAIL
Pass Example
# Small backlog only
SELECT COUNT(*) FROM cron_schedule WHERE status='pending';
count = 3
# Within safe threshold → PASS

References