I am using Magento 2.3 inside an UBUNTU 16.04 OS. I am trying to setup the cronjobs.
In the documentation official site the suggestion is php bin/magento cron:install [--force]
. But as we can see in the picture the Magento CLI 2.3 the only available command is setup:cron:run
. .
What is the actual command in order to create the crontabs in this Magento CLI 2.3?
1 Answer
Yes, php bin/magento cron:install
is right command.
It will add there files to cron job tab to your current SSH user.
Then hit crontab l
from the command line and outout will be like below:
#~ MAGENTO START
* * * * * /usr/bin/php /var/www/html/magento2/bin/magento cron:run | grep -v Ran jobs by schedule >> /var/www/html/magento2/var/log/magento.cron.log
* * * * * /usr/bin/php /var/www/html/magento2/update/cron.php >> /var/www/html/magento2/var/log/update.cron.log
* * * * * /usr/bin/php /var/www/html/magento2/bin/magento setup:cron:run >> /var/www/html/magento2/var/log/setup.cron.log
#~ MAGENTO END
Magento asking -f or --force aad suffix during the run of this command forcefully add cronjob to current command line user/SSH user.