For the past 2 weeks or so, I’ve been pulling my hair out over an issue whereby order emails weren’t being sent out.
These are the most common questions I encountered on Google:
- Was a cronjob set up correctly? You bet your arse it was.
- Were emails sending out from the server? Yep, they were!
- Have you installed AOE scheduler? Yes I have! (Wonderful piece of kit by the way)
- Are you an idiot? Yes, I probably am.
After checking many MANY times those questions were answered, I stumbled across another StackOverflow question which I somehow missed, it suggested the following:
Edit file cron.php
$isShellDisabled = (stripos(PHP_OS, ‘win’) === false) ? $isShellDisabled : true;
$isShellDisabled = true;
As soon as that was saved, I got literally 500 emails containing “too late for schedule”. I made sure the timings matched the cron settings on Config > Advanced > System > Cron (ie, 15 minutes in the crontab = 15 minutes in the cron settings) – and BAM! My old orders came through, as did my tears of joy and relief.
The other question I have is that why wasn’t this running when other Magento installs I’ve worked with have no trouble?
EDIT – Another interesting link which might cause discrepancies with the cronjob heartbeat error – http://magento.stackexchange.com/questions/82979/magento-1-9-2-1-cron-not-working