How to Configure Magento 2 Cron Jobs


The Magento 2 upgrade system as well as many admin tasks depends on the cron jobs being configured properly. Cron jobs are scheduled tasks which run at a specific interval. Follow the steps below to set up your Magento 2 cron jobs.

Log in to your cPanel and click on Cron Jobs in the Advanced section. Add three cron job commands and configure them to run Once Per Minute:

php7 -f /home/<username>/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/<username>/public_html/var/log/magento.cron.log
php7 -f /home/<username>/public_html/update/cron.php >> /home/<username>/public_html/var/log/update.cron.log
php7 -f /home/<username>/public_html/bin/magento setup:cron:run >> /home/<username>/public_html/var/log/setup.cron.log

Replace <username> with your cPanel account username. If you prefer to use PHP 5.6 instead of PHP 7 you can replace php7 with php56 in the above commands. When the cron jobs are configured correctly it should look like this:


Was this answer helpful?