How to get Magento 2 cron jobs working with PHP 7 & InMotion Hosting
To get Magento 2 cron jobs working with InMotion Hosting and PHP 7, you’ll need to login to your cPanel and go to Cron jobs.
- Change your cron settings to once per minute (*****).
- Then copy and paste the first line below into the command field.
- Change the username to your username and the domain name to your domain name.
- Click on the blue “add new cron job” button.
- Repeat the above steps for line 2 and 3 below.
- command 1: /opt/php70/bin/php -q /home/(username)/public_html/(domainname.com)/bin/magento cron:run | grep -v Ran jobs by schedule >> /home/(username)/public_html/(domainname.com)/var/log/magento.cron.log
- command 2: /opt/php70/bin/php -q /home/(username)/public_html/(domainname.com)/update/cron.php >> /home/(username)/public_html/(domainname.com)/var/log/update.cron.log
- command 3: /opt/php70/bin/php -q /home/(username)/public_html/(domainname.com)/bin/magento setup:cron:run >> /home/(username)/public_html/(domainname.com)/var/log/setup.cron.log
This was something I stumbled upon online as a support answer on InMotion Hosting. It was my last resort trying to get cron jobs to work. It was as simple as copy and paste and next thing I know it was working.
Make sure to log into putty and change directory to your Magento installation. Then run: bin/magento cron:run –group index
Change mode in index management to “Update by Schedule”.
0 Comments