Difference Between cron:run and setup:cron:run in Magento 2

cronmagento2

It is documented to set up two cron jobs for Magento 2

*/1 * * * * /usr/bin/php /var/www/html/example/web/bin/magento cron:run 
*/1 * * * * /usr/bin/php /var/www/html/example/web/bin/magento setup:cron:run 

What is the difference between those both? Which one is responsible for the indexers?

Best Answer

cron:run is responsible for the indexers and all other normal Magento scheduled tasks.

setup:cron:run is responsible for running setup operations for the Web Setup Wizard. If you use the web setup wizard to install extensions or upgrade Magento, this command is what actually allows that to work. Without this command running, the web setup wizard will fail to actually perform any changes.

If you don't use the Web Setup Wizard, the second command is unnecessary.

Related Topic