Question

Please help me to setup a cron job to send newsletter in magento 2.1.6. Currently i'm not able to send newsletters to the subscribers. So i need to setup Cron job and check it out.

Thanks

Was it helpful?

Solution

If your hosting provider uses cPanel, you should be able to use the following Cron Job:-

php /home/<CPANEL USERNAME>/public_html/bin/magento cron:run
php /home/<CPANEL USERNAME>/public_html/update/cron.php
php /home/<CPANEL USERNAME>/public_html/bin/magento setup:cron:run

Where <CPANEL USERNAME> will be the username for your cPanel account. This also assumes that your Magento store is in the "public_html" directory. If it is in other directories, do add them in after "public_html".

Some hosting providers may also use a different path to the PHP binary so you may need to double confirm with your provider on whether you can use just PHP or if you will need something else (like /usr/bin/php).

The first command (magento cron:run) will perform the reindex, send automated e-mails, generates the sitemap, etc.

Source : https://community.magento.com/t5/Hosting-Performance/Configuring-cron-job-for-siteground/td-p/37319d

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top