Magento Cron Jobs Not Running: Troubleshooting Guide

If "Magento Cron Jobs Not Running" describes your situation, you will notice it quickly: indexers fall behind, emails do not go out, cache becomes stale, and promotions fail to apply on time.

This guide shows simple ways to check cron, fix common misconfigurations, and confirm everything is back on track.

Table of Contents

Why Magento 2 cron matters

Magento 2 cron is a built-in scheduler that automates repetitive, time-based tasks for both the core and extensions. It runs jobs at set intervals so the store keeps moving without manual effort.

Typical examples include reindexing, sending newsletters and product alerts, processing email queues, warming and clearing the cache, and updating product statuses and stock. In a default installation, 26 modules use cron for 53 different jobs, so a healthy scheduler helps keep the site fast, consistent, and up to date.

Most third-party extensions also rely on cron; a misconfigured crontab can delay or break features.

Next, we'll walk through quick diagnostics to confirm when cron isn't running and the fixes to get it back on schedule.

Symptoms of Magento cron issues

If you notice these symptoms, confirm the status with the quick checks below.

  • Admin warnings about invalid indexers or pending tasks
  • No recent entries in var/log/magento.cron.log
  • cron_schedule table shows many pending or missed jobs with old timestamps
  • Reindex and cache operations lag behind user actions

If two or more indicators appear, proceed to the checks below to confirm the issue.

How to tell if cron is not working

Use one of the methods below to verify the scheduler and pinpoint the cause.

Install Magento 2 Cron Scheduler extension

There are plenty of extensions that monitor and visualize cron job execution in detail. You can easily find one by searching for "Magento 2 cron scheduler extension" or "Magento 2 cron module".

Magento 2 Cron Scheduler Extension

Verify Magento cron jobs via SQL queries

If you do not want to install an extra extension, just open the database (in phpMyAdmin, for example) and run a simple SQL query:

SELECT MAX(executed_at) FROM cron_schedule

If cron is working correctly, the timestamp will be close to the current time (no more than about 5 minutes behind).

SQL Query to cron_schedule table

Another useful SQL query returns a list of job errors:

SELECT job_code, messages FROM cron_schedule WHERE messages IS NOT NULL

If timestamps are stale or errors appear, continue with deeper log/database debugging.

Debugging Magento cron: logs and database checks

Use detailed logs to find which jobs fail and why; next we'll review typical root causes.

  • Check var/log/magento.cron.log and var/log/system.log for exceptions, memory errors, or permissions issues
  • In the database, look at a broader snapshot: sql SELECT job_code, status, scheduled_at, executed_at, finished_at, messages FROM cron_schedule ORDER BY scheduled_at DESC LIMIT 50;
  • Typical status values: pending, running, success, missed, error. Many missed items suggest cron did not trigger on time.

Common reasons cron does not work

Once you spot a likely cause, apply the fixes in the next section.

  • Crontab is not installed for the web user (crontab -l shows nothing)
  • Wrong PHP binary in crontab, or PHP CLI differs from web PHP with missing extensions
  • Wrong Magento path in the command, so bin/magento is not found
  • File permissions or ownership prevent writing to var/log
  • Cron is installed for the wrong user, so tasks cannot access the Magento root
  • System service is inactive (cron or crond not running)

How to fix Magento cron jobs not running

Set up and verify crontab

In Magento 2, all scheduled tasks are executed by the command bin/magento cron:run.

Connect via SSH and run crontab -l to list the active cron jobs. To save the current configuration to a file for editing, run crontab -l > crontab.cfg; to install the configuration from that file back, run crontab crontab.cfg.

You can also manage the same cron entries through a web interface in cPanel (cPanel > Cron Jobs or cPanel > Scheduled Tasks).

Whether you are editing an existing cron job or adding a new one, we recommend the following entry:

* * * * * php -f [store root]/bin/magento cron:run >> [store root]/var/log/magento.cron.log 2>&1

where [store root] is the directory where Magento is installed.

This entry differs slightly from the one in the official Magento 2 docs, but it has a clear advantage: every error and every successful run is recorded in the log file.

Within a minute of adding the cron job, the log file [store root]/var/log/magento.cron.log will appear, containing either an error message or the success line "Ran jobs by schedule".

If the file does not appear within a minute, the path to the store root is wrong or the user has no permission to write to var/log/.

Common cron errors and how to solve them

Most failures come down to user context, paths, PHP CLI, permissions, or the OS service. Start here, then validate with the commands below.

  • Install crontab for the same user that owns the Magento files
  • Use absolute paths to PHP and to [store root]
  • Ensure required PHP extensions and memory limits match CLI needs
  • Fix permissions so the Magento user can write to var/log
  • Confirm the system service is running:
    • Debian or Ubuntu: systemctl status cron
    • CentOS, RHEL, or Alma: systemctl status crond

After applying a fix, use the quick commands below to confirm cron is actually firing and writing logs.

Quick commands to verify and fix cron

A crontab entry with less log noise:

* * * * * /usr/bin/php [store root]/bin/magento cron:run | grep -v "Ran jobs by schedule" >> [store root]/var/log/magento.cron.log 2>&1
  • grep -v hides routine "Ran jobs by schedule" lines, so errors stand out
  • Use the full path to PHP, for example /usr/bin/php or the output of which php
  • Run every minute to keep schedules responsive

Run once from CLI to test:

[store root]/bin/magento cron:run

You should see new lines in var/log/magento.cron.log and recent timestamps in cron_schedule.

Magento 2 Cron Log File

Check if cron is installed for the current user:

crontab -l

Alternatively: crontab -u <web-user> -l.

If the output is empty, cron isn't configured for this user.

Tail the Magento cron log to see real-time updates:

tail -f [store root]/var/log/magento.cron.log

Shows the log in the terminal and refreshes automatically as new lines are written. Press Ctrl+C to stop streaming.

Run cron for a specific group (targeted debugging):

php [store root]/bin/magento cron:run --group="default"

Runs only the specified group without triggering all jobs - useful for testing newsletters or index tasks in isolation.

Reinstall and refresh cron configuration:

php [store root]/bin/magento cron:install

If cron was missing, corrupted, or edited manually, this restores the correct crontab so jobs run at the intended intervals.

php [store root]/bin/magento cron:run

Executes all due cron tasks immediately, without waiting for the system schedule. Together, these two commands are often run right after installing or upgrading Magento to confirm that cron is configured correctly and actually executes its tasks.

Environment checklist for Magento cron

Use this short checklist to confirm the environment is correct before you rely on cron.

Checkpoint Command / Notes
Which PHP will cron use? which php and php -v
Who owns the Magento files? ls -la
Can that same user run Magento without errors? php [store root]/bin/magento
Do logs update after cron:run? If not, recheck paths and permissions

Conclusion

Cron is vitally important, which is why you should pay extra attention to it and make sure that it is operating correctly. Cron error checking is implemented in our Stability Suite for Magento 2, which will also notify you of any errors.

Appendix: Magento 2 modules that use cron

The Magento 2 core modules that use cron are: NewRelicReporting, ProductAlert, CatalogRule, Integration, Backup, Sales, Persistent, Newsletter, Directory, Analytics, Shipping, Security, Catalog, Captcha, Backend, Sitemap, Tax, Customer, Paypal, Indexer.

Mirasvit extensions that use cron: Search, SearchSphinx, Misspell, Stability, Rewards, Affiliate, Email, Report, Helpdesk, RMA, Store Credit.

FAQ

chevron-down chevron-right

What does bin/magento cron:run do in Magento 2?

It triggers the scheduler to pick up due jobs from cron_schedule and execute them. It does not replace the system cron; you still need a crontab entry to run it regularly.

chevron-down chevron-right

Why are scheduled tasks not triggering?

Usually because the system cron is missing, running under the wrong user, calling the wrong PHP, or pointing to the wrong Magento path. Logs and the cron_schedule table will show the first clue.

chevron-down chevron-right

How often should cron run?

Every minute is a safe default. Magento batches work and respects each job's schedule, so a one-minute trigger keeps everything timely.

chevron-down chevron-right

Can I run a job immediately?

You can run php bin/magento cron:run from CLI to process due tasks now. For a specific job, adjust its scheduled_at in cron_schedule or use an extension that queues it.

Oleksandr Drok

Head of Product at Mirasvit

Alex serves as the Head of Product at Mirasvit, where he formulates the vision for Mirasvit's extensions, carefully curates new features, and constructs the roadmap.
Related Products
Health & Performance Monitoring Suite M2

The Extension monitors code and configuration changes of your store, and automatically notifies you if these changes have negatively affected the key store indicators. If you change anything and find that either your store begins to work more slowly, or you suddenly experience new errors occurred, the extension will quickly notify you about it.

Keep Learning

Loading...