Hi,
I'd like to know which cron jobs do I need to setup in cpanel (siteground hosting) for magento to work?
right now I setup this: php bin/magento cron:run
is that enough? does it also include "php bin/magento indexer:reindex" or do I need to setup other cron jobs?
Hi @robertbits
To create a cron job for the Magento file system owner, enter the following command as a user with root privileges:
crontab -u <Magento file system owner username> -e
A text editor displays. (You might need to choose a text editor first.)
* * * * * <path to php binary> <magento install dir>/bin/magento cron:run | grep -v "Ran jobs by schedule" >> <magento install dir>/var/log/magento.cron.log
* * * * * <path to php binary> <magento install dir>/update/cron.php >> <magento install dir>/var/log/update.cron.log
* * * * * <path to php binary> <magento install dir>/bin/magento setup:cron:run >> <magento install dir>/var/log/setup.cron.log
where
This will also take care of indexing cron.
If you want to know steps with example you can follow these links:
https://inchoo.net/magento-2/running-cron-jobs-in-magento-2/
https://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html
If my answer is useful, please Accept as Solution & give Kudos.
I think its better for you to not go in crontab yourself and set cron manually but let Magento do it for you. Ideally you can just your cpanel via ssh and run below command and that should do the needed cron setup for you.
php bin/magento cron:install
thanks for your response, but I cannot seem to be able to run the commands you gave me. I believe the problem is that I am hosting magento on shared hosting, and I don't have permissions to run those commands.
If you are able to setup from cpanel please try these link :
https://www.properhost.com/support/kb/41/How-to-Configure-Magento-2-Cron-Jobs
https://www.metagento.com/blog/setup-cron-jobs-magento-2-with-cpanel-and-ssh.html
Good evening everyone here! So, there are so many various opinions about this theme and I believe that this is okay. People have different requirements and different expectations. I usually carefully read all the conditions on the site https://uk.jooble.org/jobs-amazon/Nottingham because it helps to avoid common mistakes and shows you what you get at the end. I just think that it's quite difficult to find anything reliable right now, but I'm sure that everything will be great, and we will get what we want.