1

I don't have much knowledge in Magento, but I'm spending a lot of time trying to set up crontab. I tried to follow the steps available on the Magento website, but early on when I try to run the command bin/magento cron: install --force I already come across an error that I can't solve. I use Professional Cloud Server from Hostinger. Can someone help me?

As you can see.

2 Answers 2

0

Make sure the crontab is configured

crontab -l

A sample follows:

#~ 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

Refer devDoc Cron config

Please check and let me know. Happy to contribute

1
  • When I try this command, it returns the value no crontab for XXXX Sep 11, 2019 at 15:21
0

There is either no crontab command for your environment or you couldn't access it.

Please type in the terminal:

which crontab

which should return something like below:

~ $ which crontab
/usr/bin/crontab

Edit:

Since your system return that statement for alias, alias is a way to link a command/function to execute another command/function.

add this into your ~/.bashrc or ~/.profile or ~/.bashprofile depends on your environement

alias crontab='__crontab'

see https://askubuntu.com/questions/17536/how-do-i-create-a-permanent-bash-alias

1
  • I tried using this command and got this answer. alias crontab='__crontab' Any Idea? Sep 11, 2019 at 15:19

Your Answer

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

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