1

I am having Magento 1.9.3 and i am new to Magento. My newsletter subscription and order confirmation mails are not sending. I have checked all things in Magento configuration. Seems its the trouble with cron on server. But with out knowing i do not want to make changes on server. I am using A2 hosting provider, and there is a cron set like this, which runs for every 30 mins.

/bin/cagefs_enter.proxied php /home/lasakico/public_html/cron.php 1>/dev/null 2>/dev/null

I am not sure what is the problem, either its the problem with cron or magento.

I have checked Magento Configuration->Advanced->System->Cron, where values are stored for Generate Schedules Every : 15. and rest are like 20, 15, 10, 60,600

Please let me know if anything is not clear in the question. I will ans them.

2 Answers 2

1

from some security patch magento does not allow to run cron.php directly

you have to configure cron.sh file which ultimately runs cron.php file

to configure cron.sh file you have to add

*/5 * * * *    /bin/sh /path/to/magento/cron.sh

in your case

*/5 * * * *    /bin/sh /home/lasakico/public_html/cron.sh 
9
  • should i add this line in crontab file after following line? /bin/cagefs_enter.proxied php /home/lasakico/public_html/cron.php 1>/dev/null 2>/dev/null
    – Maverick
    Commented Dec 20, 2016 at 6:18
  • @Maverick I think its good if you add this line before that cron.php line Commented Dec 20, 2016 at 6:24
  • i did add this. but still it is not working.
    – Maverick
    Commented Dec 20, 2016 at 8:11
  • when cron is running i am getting this mail X-Powered-By: PHP/5.5.38 Content-type: text/html
    – Maverick
    Commented Dec 20, 2016 at 8:21
  • @Maverick after 5 minutes Commented Dec 20, 2016 at 8:22
0

After Magento 1.9 the order confirmation emails are not sent during checkout anymore and instead are being sent with the cron. Make sure your Cron is working (you can check the cron logs /var/log/cron).

Also make sure Magento cron is running every five minutes. You should see something like this in Crontab (in your server):

*/5 * * * * /public_html/cron.sh

Also this extension helps you to manage cron jobs in Magento: AOE Scheduler

OR

Just do a small change in order.php (public_html/app/code/core/Mage/Sales/Model/Order.php).. (don't edit it directly..please override it.)

From

$mailer->setQueue($emailQueue)->send();

To

$mailer->send();

OR

go to System -> Configuration -> ASCHRODER EXTENSIONS -> SMTP -> Queue Configuration -> Queue Usage -> Never
1
  • tried step 1 and 3. Step 1 did not work. installed AOE scheduler. But it is not showing blank screen on magento admin. Also i do not find the log file at var/log/cron. Where should i check it?
    – Maverick
    Commented Dec 20, 2016 at 8:08

Your Answer

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

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