1

In Magento 2.2

My Magento cron job is as follows

* * * * */opt/alt/php71/usr/bin/php /home/XXX/public_html/bin/magento cron:run 2>&1 | grep -v Ran jobs by schedule

Due to this cron, so many email came. In 1 minute, 3-5 emails.

about the mail :

grep: jobs: No such file or directory
grep: by: No such file or directory
grep: schedule: No such file or directory

Anyone know what happened?

Please assist. Thank you

1 Answer 1

3

Please update

grep -v Ran jobs by schedule

to

grep -v 'Ran jobs by schedule'

Example cron job is as follows

* * * * * /usr/bin/php /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/magento2/var/log/magento.cron.log
* * * * * /usr/bin/php /var/www/magento2/update/cron.php >> /var/www/magento2/var/log/update.cron.log
* * * * * /usr/bin/php /var/www/magento2/bin/magento setup:cron:run >> /var/www/magento2/var/log/setup.cron.log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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