Troubleshooting Magento Open Source cron jobs

A practical guide to finding why scheduled jobs stop in a self-hosted Magento Open Source store, from crontab ownership and the two-run model to stuck cron_schedule rows and multi-node layouts.

On this page

Why Magento Open Source cron jobs stop and how to find the cause

Cron failures in Magento Open Source rarely announce themselves. The storefront keeps serving pages, orders still go through, and nobody notices until indexers lag behind catalog changes, transactional emails stop arriving, or the sitemap stops updating. Those symptoms all trace back to scheduled jobs that stopped running or stopped finishing. Magento uses cron to drive background work: reindexing, cache maintenance, queued message handling where consumers are scheduled, email dispatch, sitemap generation and many module tasks. When that schedule breaks, the store looks healthy from the front end while its back-office processes quietly fall behind. A team should start this troubleshooting as soon as any of those delayed outputs appear, or when a new deployment, server move or PHP upgrade changes the environment that cron runs in.

This page is about diagnosis, not a single fix. A stopped cron job has several common causes, and they point to different checks: the crontab may belong to the wrong system user, the schedule may never have been installed on the node that serves the store, or a job may be stuck in the cron_schedule table with a status that blocks later runs. Each cause leaves a different trail. Before changing anything, the operator should confirm which user owns the crontab, whether the cron entry runs under the same PHP version and file permissions as the web application, and what the most recent entries in cron_schedule show for each job code. Confirm the exact cron invocation and log paths against the Magento documentation for the release you run, because they vary by installation layout and version.

Plan for the diagnosis to take longer on multi-node layouts. When several web or admin servers exist, a cron entry may be present on one node and absent on another, or two nodes may compete for the same jobs. Decide up front which node runs scheduled tasks, record that decision in your deployment runbook, and check that no other node quietly runs the same entries. Ask your team or partner to document how cron is installed in each environment, because that record shortens every later investigation. The Magento Open Source deployment and performance sections of this site cover the layouts in more detail.

How to confirm cron is actually running

This sequence shows whether the crontab entry exists for the right user, whether Magento's cron command runs by hand, and whether the scheduler is recording jobs in cron_schedule and the logs. Each step ends with a check, so you know where the failure sits before you change anything.

  1. Confirm the crontab entry exists for the web user

    Log in to the server as the account that owns the Magento install, or use sudo to switch to it, and list its crontab with crontab -l. Look for a line that runs bin/magento cron:run from the install root, with the correct PHP binary and an absolute path. The web server user, often www-data or nginx depending on the distribution, must be the account that owns this entry, because a crontab set for root or another user will not run as the store owner. Check is done when the entry appears under the same user that owns the files in the install directory.

  2. Run the cron command from the command line

    Change to the Magento root directory as the same user and run php bin/magento cron:run. Watch the output for errors such as a missing PHP extension, a permissions problem on var or generated, or a database connection failure. Run it a second time to confirm it exits cleanly without a fatal error. The check passes when the command returns to the prompt with no exception, which shows the scheduler can execute at all, independent of cron itself.

  3. Inspect cron_schedule for pending and running rows

    Query the cron_schedule table in the Magento database, for example with SELECT status, COUNT(*) FROM cron_schedule GROUP BY status;, and then look at recent rows ordered by scheduled_at. Rows with status pending should move to success or error within a few cron cycles. A growing count of pending rows, or rows stuck in running with an old executed_at, means jobs are queued but not being picked up. The check passes when recent scheduled_at values advance over successive runs and running rows do not persist.

  4. Check for missed and error rows

    Filter cron_schedule for status missed and status error, and read the messages column for the failing rows. Missed rows usually mean the scheduler did not run at the scheduled time, so compare their timestamps with your crontab frequency and with any maintenance or server restarts. Error rows carry the exception text that the job raised. The check is complete when you can name the job codes that fail and the messages they report, or when the list is empty over a recent window.

  5. Read the cron log and system log

    Open the cron-related output in var/log under the Magento root, and review system.log and exception.log for entries from the same time window as the failing rows. If your crontab redirects output, check that target file too. Also confirm the system cron daemon logged the run, using your host's cron log location, which varies by distribution. The check passes when each failing job matches a logged event, and the logs show a run at each expected interval.

  6. Confirm the scheduler on every node

    On a multi-node layout, repeat the crontab and command checks on each node that is set to run cron, and confirm only the designated node runs the scheduler. Compare cron_schedule activity with the node layout in your deployment notes, because duplicate or absent schedulers both cause stuck jobs. The check is done when one scheduler owner is documented, each node's crontab matches that decision, and recent rows show a single consistent source of runs.

Common causes by environment: single server, containers, managed hosting

On a single virtual or dedicated server, cron usually stops for mundane reasons: the crontab was installed under a different user than the one that owns the Magento files, or the entry calls a PHP binary that is not on the path cron uses. Cron runs with a minimal environment, so a command that works in an interactive shell can fail silently from the scheduler. Check the crontab of the web user that owns the code, not the root account or a personal login.

  • Wrong crontab owner: The entry sits in the crontab of a user that cannot write to var/ or generated/, so jobs start and fail on permissions.
  • Missing PHP path: The entry calls php without a full path, and cron resolves a different binary than the one your shell uses.
  • Mismatched PHP version: Several PHP versions are installed, and the cron entry points at one that does not match the web server.
  • Disabled cron service: The cron daemon is stopped or was not enabled after a server rebuild.
  • Output swallowed: Redirection to /dev/null hides the error, so the job looks scheduled but never completes.

Ask the hosting or systems team to confirm which user runs the web process, which PHP binary the web server uses, and that the cron service is enabled and logging on the host.

Which cron configuration fits which store

This table compares three ways to run Magento cron: the system crontab on a single node, a dedicated scheduler host, and a supervisor or container-based scheduler. Read each row against your store's node count, your team's access to the host and how much of the schedule you need to observe from outside the web tier. The main takeaway is that the choice matters less than having exactly one scheduler actively running the cron group across all nodes.

OptionWhat it suitsWhat it risksWhat to confirm with the host
System crontab on one nodeSingle-server stores with one web node and a small team that already manages the server crontabCron stops silently if the crontab owner changes or the user lacks permission; no separate alert pathWhich OS user owns the crontab, that it runs as the file owner of the Magento install, and where cron output is logged
System crontab on one node, with a scheduler hostStores where web nodes scale out but scheduled jobs should run from one controlled machineThe scheduler host becomes a single point of failure; a second host added by mistake can double-run jobsWhich host runs cron, that web nodes have cron disabled, and who gets alerted if the scheduler host goes down
Supervisor or container-based schedulerTeams that already run Supervisor or containers and want restarts, resource limits and logs managed by the platformMisconfigured restart policies can loop; a scaled-out container set can run cron on every replicaHow many replicas run the cron process, whether the platform restarts it on failure, and where its stdout is captured
Multi-node without a designated schedulerRarely a deliberate choice; usually the result of every node inheriting the same crontabDuplicate runs, lock contention in cron_schedule and repeated index or email jobsWhether each node has a cron entry today, and whether your deployment pipeline copies crontabs between nodes
Cron run by a managed hosting providerStores on a hosting provider that documents its scheduler and gives access to its logsScheduling and log access depend on the provider's tooling, which may differ from Adobe's documented setupWhether the provider runs cron for you, how it is started and monitored, and how you get the cron log
Scheduler outside the Magento host using HTTP callsAlmost never suitable for Magento cron, which is a CLI commandJobs run without the expected PHP environment or file permissionsWhether any external tool is planned to call Magento; if so, confirm it runs the bin/magento cron command instead

Reading stuck, missed and error entries in cron_schedule

Before you change anything, read the cron_schedule table to learn which kind of failure you have. Each row records one scheduled run of a job, identified by job_code, with a status, the scheduled_at time, and the executed_at and finished_at times when they exist. Confirm the status values against the cron documentation for your Magento Open Source version, but the usual meanings are: pending (queued for a future run), running (picked up by a process and not yet finished), success (completed), missed (its scheduled time passed without execution), and error (the job ran and failed, with the detail in the messages column). Group the rows by job_code and status before deciding anything, because one stuck job and a backlog across all jobs call for different responses.

A row that stays in running usually means the process that claimed it stopped before it could write a final status. Typical causes are a killed PHP process, a memory or time limit reached mid-job, or a server restart during execution. A job can also be legitimately long-running, so compare the age of executed_at with how long that job normally takes on your store. First check whether a cron:run process is still alive on the host that owns the job. If the row is old and no process exists, the cause is worth finding in the logs before you clear it. Old pending rows pile up when cron stops, because scheduled runs keep being queued while nothing consumes them. Once cron resumes, confirm how the backlog is handled before assuming it will clear.

Clearing rows on a production database is a change to the system of record, so treat it as one. Take a database backup that you have confirmed can be restored, and test the restore on a separate environment before the cleanup window. Fix the cause first, such as the crontab owner, the PHP user, or a stalled process, so the cleared rows do not reappear. Delete only the specific rows you have identified, filtered by job_code, status and time, and record the counts before and after. Deleting a row for a job that is still running can allow a second run to start. Ask whoever owns the crontab and the deployment pipeline to confirm that no cron process is active before you start.

Where cron logs and related evidence live

When scheduled jobs stop, the evidence is spread across the system cron log, Magento's own logs and the database table that records each run. Checking them in a fixed order separates a scheduler problem from an application failure. File locations depend on your version and logging configuration, so confirm them on your own servers before you rely on them.

System cron log

The operating system's cron daemon records when it starts a job and whether the command ran. Check it first to confirm that the Magento cron entry fired at all. On many Linux systems this is the syslog or journal output for the cron service, and a missing entry usually points to the crontab owner, the cron service state or a syntax error rather than to Magento. Confirm the log location for your distribution, because it varies.

Magento cron output

The command in the crontab sends output to a file or to mail when it runs. This is where PHP errors, memory limits and permission failures from the bin/magento cron:run process appear. Redirect output to a dedicated file for the store, so that a failed run leaves a trace you can read after the fact. Confirm where your crontab sends stdout and stderr.

Magento system and exception logs

Magento writes application events to its own log files under var/log. Exceptions thrown by a cron job are normally recorded there, which lets you see which job failed and with what message. Compare timestamps with the system cron log to tell whether a job never started or started and then threw an error. Confirm the file names and log level in your env.php configuration.

cron_schedule table

The cron_schedule table in the database records each scheduled job with its status, planned run time and completion time. Rows stuck in a running state or pending rows that never move are the clearest sign that a job stopped mid-run. Query it to see which jobs are missing and when they last completed. Treat it as the record of job state, not as the source of error messages.

Multi-node cron evidence

On a multi-node layout, each web or cron node can write its own system log and its own Magento log. A job that appears to run on one node may have failed on another. Gather logs from every node that has a crontab entry, and confirm which node is designated to run cron. Ask your deployment team to document this mapping, since it changes with the topology.

Version-specific checks

Log behavior and cron tooling depend on the release line and PHP version you run. Adobe publishes supported combinations in the system requirements for each release, and the current line is 2.4.9. Record your exact version and PHP version when you open an investigation, and check the matching documentation before changing configuration.

System requirements

How cron triggers Magento jobs across nodes

The system scheduler runs the Magento cron entry point as the file owner of the installation, which schedules due jobs as rows in the cron_schedule table in the shared database. A consumer or job runner then picks up pending rows and writes its status and log output. On multi-node setups, check which nodes actually run cron, confirm that every node points at the same database, and read the log for each run before assuming a job ran.

Cron entry point, shared state table, job runner and log on a multi-node layout.

Running cron on multi-node Magento Open Source setups

A multi-node store adds a second question to cron troubleshooting: which node runs the scheduled work, and how do shared services record its state. The cards below cover the risks of duplicate runs, the scheduler decision, and the shared database and queue behavior that affects job status.

Duplicate runs on every web node

If each web node runs the same crontab, every node may try to start the same scheduled job at the same time. Jobs such as index refreshes, sitemap generation and queue publishing can then run several times, compete for locks and leave cron_schedule in conflicting states. Check the crontab on every web node and confirm which ones contain the Magento cron entry. Look for repeated process IDs for the same job in the system logs.

Designating one scheduler node

Pick one node to own scheduled work and remove the cron entry from the others, unless the official documentation for your release describes a different pattern. The scheduler should run as the same system user that owns the Magento file tree, with the same PHP version and the same env.php as the web nodes. Record the decision in your runbook so that a replacement node is not added with cron enabled by mistake.

Shared database state

All nodes read and write the same job records in the database, so a job marked as running on one node blocks or confuses the others until its status changes. A node that crashes mid-run can leave a job in a running state that never clears. Query cron_schedule after a node failure and confirm whether stale running rows remain before you restart cron.

Queue services and consumers

Consumers run through the same message broker on every node, so consumer processes started by cron on several nodes can double-process work or stall. Confirm where consumers are started and whether they are managed by a process supervisor or by cron, and make sure the scheduler node and the consumer hosts are not duplicating each other. Confirm the supported setup for your version with the RabbitMQ and consumer documentation before changing it.

Confirm the supported pattern

Multi-node layouts change between releases and depend on your session, cache and file storage choices. Before you change cron placement, read the deployment and cron documentation for your exact release and confirm the supported scheduler pattern. Test any change on a staging layout that matches production node count, then watch cron_schedule and the cron log for one full cycle.

System requirements

Questions teams ask before fixing Magento cron themselves

How long does a Magento cron diagnosis take?

The length depends mostly on how many layers are involved: the crontab entry, the user it runs as, the PHP binary, file permissions, the cron_schedule table and the consumers or jobs that cron starts. A single-node store with a broken crontab owner is usually a short check. A multi-node store, or one where jobs run but stall, takes longer because each node and each job group needs its own evidence. Ask any partner for a fixed-scope plan that lists the layers they will check and the evidence they will return, since that list is what the quote is really pricing.

Can an in-house engineer fix Magento cron without outside help?

Often yes, if the engineer can read the crontab, switch to the web server user, run bin/magento cron:run by hand and query cron_schedule. The hard cases are stuck entries that block newer runs, multi-node setups where only one node should run cron, and stores where the same problem returns after each deployment. Those need someone who knows the Magento two-run model and how your deployment pipeline touches the file system. Assess whether your team has that knowledge before deciding.

What access does a cron fix require?

The work needs read access to the crontab for the user that runs Magento, the Magento root directory, the logs, and the database tables that hold schedule state. It usually also needs a non-production copy or a maintenance window to test changes, and write access to the crontab only when a fix is approved. Ask for named, least-privilege accounts, a record of every change, and no shared root logins. Confirm whether database access can be read-only for diagnosis.

What does a partner need from our team to start?

A partner needs the Magento version and PHP version in use, the hosting layout (single node, multi-node, containers or managed platform), the cron user and crontab entries, recent entries from the system and exception logs, and a timeline of when jobs last ran successfully. A deployment history helps too, because many cron failures start after a release changed file ownership or the PHP binary. Name one technical contact who can approve changes and one person who owns the production window.

What drives the cost of a cron engagement?

Cost follows the number of nodes, the number of cron groups and custom jobs, how much of the environment is undocumented, and whether the fix must be tested in a staging copy before production. You pay for diagnosis time, the change itself, and any retest. Recurring costs appear only if you add monitoring or a retainer. Ask for a quote that separates one-time investigation from ongoing checks, and that states what happens if the root cause sits in a custom module rather than in configuration.

Which versions does the cron advice depend on?

The commands and table names are stable across the 2.4.x line, but the supported PHP, MySQL or MariaDB and OpenSearch combinations change with each release. Adobe's system requirements for 2.4.9 list PHP 8.5, MySQL 8.4 or MariaDB 12.3 (recommended) or 11.8, and Adobe supports only the listed combinations. Confirm your version against the Adobe Commerce system requirements before changing anything, because an unsupported PHP build is a common cause of silent job failures.

What recurring checks stop cron from failing again?

Useful recurring checks are an alert when the most recent successful run is older than your agreed interval, a daily review of entries left in running or error status in cron_schedule, and a check that the crontab still exists for the correct user after each deployment. Add a post-deployment step that confirms file ownership and the PHP binary. Review these checks after every Magento patch, because each patch cycle can change the jobs in play. Ask any partner which of these they will set up and who receives the alerts.

When a store should bring in outside help

Bring in an outside engineer when cron problems keep coming back after each fix, because a repeated stall usually points to a cause outside the one job that failed. If the crontab owner has been corrected, the PHP binary path confirmed and the stuck cron_schedule rows cleared, yet jobs stop again within a short time, the root cause is likely in the way the host, the process manager or the application state interacts. An engineer who has already seen that pattern will test the two-run model, the lock behavior and the consumer processes together rather than working through the same checklist a second time. Keep a dated record of each stall, the log lines around it and each change made, so the outside engineer starts with evidence instead of recollection.

Multi-node and containerized layouts raise the stakes. When cron runs on more than one web node, on a dedicated cron host, inside a sidecar container or under an orchestrator's scheduler, the questions shift to which node owns the schedule, whether the same job can run twice and whether the containers share the code, the env.php file and the database as expected. Mistakes in these layouts often look like random missed jobs, which makes them slow to diagnose internally. Confirm with your platform team which component is meant to run cron before you ask for help, because an outside engineer will need that answer on day one and will also need access to the deployment pipeline, not only the server.

How DeployOpen works on this

DeployOpen approaches cron trouble on Magento Open Source as a bounded piece of work inside your own infrastructure: we establish which user owns the crontab, how the two-run model is wired, and where failures are recorded before changing anything. The result is a written diagnosis, a tested fix and a runbook your operations team can follow after the engagement ends.

How we scope

  • Written scope names the servers, PHP and Magento versions, and the cron entries in use before work starts.
  • We confirm which user owns the crontab, whether the Magento cron entry runs on every node, and where logs are collected.
  • Engagements are fixed-scope, so deliverables and timelines are agreed in writing before any change is made to production.

How we build

  • We check cron_schedule status and stuck entries against the configured run intervals and the two-run model, then reproduce the fault on a non-production copy.
  • We correct the crontab owner, file permissions and PHP binary path, and align multi-node layouts so only the intended nodes run scheduled jobs.
  • We test cron-driven tasks such as indexer and queue triggers on staging, confirming they complete and clear their backlog without manual intervention.

How we hand over

  • You receive a written diagnosis that records the root cause, the evidence used, and the changes made to crontab, configuration and host settings.
  • The handover includes a runbook covering the log locations to check, the commands to inspect cron_schedule, and the alerts worth configuring.
  • We walk your operations and engineering staff through the runbook so the team can repeat the checks without our involvement.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers for stores that need cron health checked over time.
  • Ask whether the retainer covers reviews after each Magento patch release, since patch cycles can change cron behavior and dependencies.
  • Confirm with us during scoping how post-fix monitoring, escalation and response times will be defined in the agreed written scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.