How to setup and run cron for Magento 2?

cron
(Dmitry Fedyuk) #1

The command line to execute Magento 2 cron jobs is:

php <path to magento root>/bin/magento cron:run

To get it executed automatically you need add it to /etc/crontab, for example:

*/1 * * * * www-data php <path to magento root>/bin/magento cron:run
*/1 * * * * www-data php <path to magento root>/update/cron.php
*/1 * * * * www-data php <path to magento root>/bin/magento setup:cron:run
1 Like

Where is update/cron.php?
How is a «Cron script readiness check» implemented on a Magento 2 installation?
How can an extension schedule a cron job with a crontab.xml file?
How to run a custom single cron job from the command line (console)?
How to run a single cron job execution group?
How to disable the «Cron script readiness check» on a Magento 2 upgrade?
Why is my product not showing up on the frontend?
How to place a cron job into a custom execution group?
How to disable the «Cron script readiness check» on a Magento 2 installation?
(Dmitry Fedyuk) #2

See also:

0 Likes

(Dmitry Fedyuk) split this topic #3

A post was split to a new topic: How to setup Magento 2 cron in cPanel?

0 Likes