0

I had created cron.php file in my project and added the script.This is the code inside the file and setup cron job once per 5 minutes successfully even I got mail notifications too.

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/bin/magento indexer:reindex

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/bin/magento cron:run

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/update/cron.php

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/bin/magento setup:cron:run

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/bin/magento cache:clean

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/bin/magento cache:flush

Whenever the cron file is running there should be a change in cron_shedule table,unfortunately I found that there is no change in the table.But when I run the command through ssh (magento cron:run) values are generated in table and showing status as pending .

Amit Bera
  • 77,456
  • 20
  • 123
  • 237
ren
  • 365
  • 2
  • 15

1 Answers1

0

I guess that your php path location is wrong

You should use

/usr/local/php56/bin/php-cli 

instead of

/usr/local/bin/php /usr/local/php56/bin/php-cli
Amit Bera
  • 77,456
  • 20
  • 123
  • 237