Recently i had moved my website from Bluehost to AWS.
Now i have to create cronjobs for magento in AWS (Ubuntu OS). please help me how to setup the cronjobs in Linux and if possible please share me the guide.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityRecently i had moved my website from Bluehost to AWS.
Now i have to create cronjobs for magento in AWS (Ubuntu OS). please help me how to setup the cronjobs in Linux and if possible please share me the guide.
go to AWS Console
select your instance
select connect
from menu
choose your connection
after connection:
cd
to magento webroot, and run as magento files owner bin/magento cron:install
https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html
You have to have SSH access to your Magento 2 installation in order to run it as smooth as it should. Make sure, you get the access.
As soon as you have access to your instance, go to the Magento 2 root directory and run php bin/magento cron:install
then put below 3 command
* * * * * <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
if you are on magento 2.4 then run only below single command other is deprecated
* * * * * <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
Depending in the admin panel, you might have to enter the path to the PHP binary. If you are not sure which path it is, just try php.
in last run "crontal -l" for check your cron setuped or not
hope this helps you :)