Magento – Magento 2 crontab: not found

-setupcrontabmagento2

I read many about problems with setup magento CRON but I don't find something about this error message with putty ssh connection:

Error during saving of crontab: sh: line 6: crontab: command not found

It is a new Magento 2.2.6 installation.

Where is my mistake?

With Mag 1.9 I had zero problems to activate the CRON. But the Mag 2 seems very complicated.

Best Answer

Check out, the document

I guess that you have added cron from cpanel

In order to php bin/magento cron:install

First, your current Cli user have any record at crontab. So, Check existing cron list using below code

crontab -l

You have to add magento cron

* * * * * /usr/bin/php /{ProjectPath}/bin/magento cron:run | grep -v Ran jobs by schedule >> /{ProjectPath}/var/log/magento.cron.log
* * * * * /usr/bin/php /{ProjectPath}/update/cron.php >> /{ProjectPath}/var/log/update.cron.log
* * * * * /usr/bin/php /{ProjectPath}/bin/magento setup:cron:run >> /{ProjectPath}/var/log/setup.cron.log
Related Topic