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.

    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”.

    Written by:

    Hi, I'm Elyssa. A blogger of "the life that I live" hoping to help others in similar situations. Lover of food, dogs, and a fighter when challenged by health issues and anxiety.

    Leave a Reply

    Your email address will not be published. Required fields are marked *