What cron keeps running
The server’s crontab calls bin/magento cron:run every minute. Magento then picks the jobs that are due from each cron group and records every run in the cron_schedule table. A few of those jobs matter directly to the checkout:
| Job or group | What it does | When it stops |
|---|---|---|
indexer_update_all_views | Applies catalog, price and stock changes when indexers are on Update by Schedule | Cart shows old prices, sold-out products stay buyable |
sales_send_order_emails | Sends order emails when asynchronous sending is on | Customers get no confirmation and write in |
sales_clean_orders | Cancels old Pending payment orders and frees their stock | Stock stays reserved for orders nobody paid |
consumers_runner | Starts message queue consumers | Stock reservations and async work pile up |
catalogrule_apply_all | Applies catalog price rules on schedule | A promotion never starts or never ends |
Why cron stops
Almost always for dull reasons: a server move that forgot the crontab, a crontab that calls a different PHP version than the web server, a job that hangs and keeps its group from running, or a lock left behind after a crash or a full disk. None of them shows an error on the storefront.
Pages load, products add to the cart and orders go through. That is why a dead cron is usually found days later, through a customer asking where their confirmation email is.
Check it in five minutes
Start with the crontab of the user that owns the Magento files. It should contain the lines bin/magento cron:install writes:
# As the Magento file owner, not root
crontab -l | grep -i magento
# Missing? Install the standard entries
bin/magento cron:installThen ask the database when jobs last ran and which ones failed. Add your table prefix if the store uses one:
-- Last finished jobs: the newest finished_at should be minutes old
SELECT job_code, status, finished_at
FROM cron_schedule
WHERE status = 'success'
ORDER BY finished_at DESC
LIMIT 10;
-- Recent errors with their messages
SELECT job_code, executed_at, LEFT(messages, 200) AS error
FROM cron_schedule
WHERE status = 'error'
ORDER BY executed_at DESC
LIMIT 10;Finally run cron by hand with the same PHP the crontab uses. Errors that were going nowhere now print on screen:
php bin/magento cron:run --group=default
php bin/magento indexer:statusIndexers that never catch up
With indexers on Update by Schedule, which Adobe recommends for production, a change in the admin is written to a changelog and applied by cron. If indexer:status shows indexers stuck on Reindex required or Processing for hours, fix cron first, then rebuild:
# Production: let cron apply changes instead of every admin save
bin/magento indexer:set-mode schedule
# Clear a stuck "processing" state, then rebuild
bin/magento indexer:reset catalog_product_price
bin/magento indexer:reindex catalog_product_priceA manual reindex hides the symptom for a day. If cron is still broken, the indexers fall behind again with the next price change.
Watch the heartbeat
Alert when the newest successful cron job is older than it should be, and when an indexer stays invalid. The free MageSentinel Magento module shows both on its Store health page, checks them every 15 minutes and emails you when one turns red and again when it is fixed.
An end-to-end checkout check covers the result: the cart shows the price you expect and the order goes through. Together you catch the cause and the symptom. Related: message queue consumers and MSI salable quantity. To check the checkout once, right now, run the free Magento checkout test.
Find out your checkout broke before your customers do.
Real checkout checks for Magento and WooCommerce · free plan · no card requiredMagento checkout monitoring →