0

I have set the cron on my server. In cron log file message update successfully "Ran jobs by schedule". But in the database, all cron is showing status pending.

*/1 * * * * /usr/bin/php /var/www/html/magento_main/bin/magento cron:run  >> /var/www/html/magento_main/var/log/magento.cron.log
2

Try

*/1 * * * * /usr/bin/php -c /etc/php5/apache2/php.ini[your php.ini] /var/www/magento2/bin/magento cron:run > /var/www/magento2/var/log/magento.cron.log&

*/1 * * * * /usr/bin/php -c /etc/php5/apache2/php.ini[your php.ini path] /var/www/magento2/update/cron.php > /var/www/magento2/var/log/update.cron.log&

*/1 * * * * /usr/bin/php -c /etc/php5/apache2/php.ini[your php.ini path] /var/www/magento2/bin/magento setup:cron:run > /var/www/magento2/var/log/setup.cron.log&

Instead of

*/1 * * * * /usr/bin/php /var/www/html/magento_main/bin/magento cron:run >> /var/www/html/magento_main/var/log/magento.cron.log

Make sure you set up cron properly in your server.

you can check by here [https://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html]

For set up get a reference from here [https://www.cloudways.com/blog/magento-2-cron-job/]

also, make sure you have single/multiple PHP version, if you have multiple PHP version then you need to set proper PHP library like

/usr/bin/php7.1 bin/magento

  • I have set the cron. No errors in the cron log file . Got the message in log file "Ran jobs by schedule". But cron is not working. status are pending in database. – Masud Shaikh Oct 30 '18 at 7:52
  • Yes, it would be helpful to check cron settings at server @Masud Shaikh – Himmat Paliwal Oct 31 '18 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.