cancel
Showing results for 
Search instead for 
Did you mean: 

Order Notification emails and CRON

Order Notification emails and CRON

I have recently set up a Magento site on HostGator VPS. The site sends customer order emails. However, it is not sending order notification emails.

1. The emails are queued in the database table core_email_queue

2. The CRON setup in Magento admin is:

Generate Schedules Every 15

Schedule Ahead for 20

Missed if Not Run Within 15

History Cleanup Every 10

Success History Lifetime 60

Failure History Lifetime 600

3. I have changed the permissions on cron.sh and cron.php to 744 from 644

4. I have tried a variety of CRON commands in my cpanel based on a number of forums and tutorials I have seen for setting up Magento CRON (see below)
*/5 * * * * /bin/sh /home/username/public_html/cron.sh cron.php -m=default
*/5 * * * * /bin/sh /home/username/public_html/cron.sh cron.php -m=always
*/5 * * * * username /bin/sh /home/username/public_html/cron.sh cron.php -m=default
*/5 * * * * username /bin/sh /home/username/public_html/cron.sh cron.php -m=always
*/5 * * * * php /home/username/public_html/cron.php
*/5 * * * * /opt/php56/bin/php /home/username/public_html/cron.php

But none seem to work. 

5. When I navigate to the cron.php file, I get a blank page and the emails are not sent.

Unfortunately, the host won't help because Magento is a third party system.

Have I missed anything that might be affecting the email send or the cron execution? Is there something wrong with the cron commands or is any one of them actually correct?

Any help would be immensely appreciated.

2 REPLIES 2

Re: Order Notification emails and CRON

Try something like the snippet below instead. Add BOTH lines to your crontab (and use correct paths). Make sure that cron.sh has execution rights for the crontab owner. Test both lines on command line before adding them to your crontab:

 

 

* * * * * /bin/sh /var/www/magento/cron.sh –malways 1
* * * * * /bin/sh /var/www/magento/cron.sh –mdefault 1

 

Tanel Raja

Re: Order Notification emails and CRON

We did manage to get the Cron working. Unfortunately, we discovered our email was blocking emails from the site (the dedicated IP we just signed up for was already blacklisted somehow)