cancel
Showing results for 
Search instead for 
Did you mean: 

Magento2 Cron not updating Index

Magento2 Cron not updating Index

I am having a difficult time with the Cron/Index set up.  Here are the three cron jobs I have set up in my host CP:

*/1 * * * * php /home/<mysite>/public_html/shop/bin/magento cron:run

 

*/1 * * * * php /home/<mysite>/public_html/shop/update/cron.php/update/cron.php

 

*/1 * * * *  php /home/<mysite>/public_html/shop/bin/magento setup:cron:run

 

Only the update/cron seems to run, and the index does not get updated.  I get the must be run as CLI message on the others.  

Any ideas?

2 REPLIES 2

Re: Magento2 Cron not updating Index

This challenge was solved - my web host advised me to add usr/local/bin/php / and I believe that created the correct path, however I now have a new challenge, as I am getting a fatal error message:

 

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3072 bytes) in /home/mysite/public_html/shop/vendor/composer/ClassLoader.php on line 412

 

Indexes are not updating.

 

Wondering if a shared host is a bad idea.  I will be asking this question in another topic.

Re: Magento2 Cron not updating Index

Hello johannsf,

I have the same problem due to permission so I have add permission manually and its work for me. Hope this will help you.


* * * * * sudo /usr/bin/php70 -c /etc/opt/remi/php70/php.ini /var/www/html/bin/magento cron:run >> /var/www/html/var/log/magento.cron.log
* * * * * sudo /usr/bin/php70 -c /etc/opt/remi/php70/php.ini /var/www/html/update/cron.php >> /var/www/html/var/log/update.cron.log
* * * * * sudo /usr/bin/php70 -c /etc/opt/remi/php70/php.ini /var/www/html/bin/magento setup:cron:run >> /var/www/html/var/log/setup.cron.log