Magento

How to get Magento 2 cron jobs working with PHP 7 & InMotion Hosting

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.

  1. Change your cron settings to once per minute (*****).
  2. Then copy and paste the first line below into the command field.
  3. Change the username to your username and the domain name to your domain name.
  4. Click on the blue “add new cron job” button.
  5. 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.

No Comments

    Leave a Reply