Tsohost Knowledge Base

Magento Cron Not Working

Modified Thursday 5th November, 2015 at 11:18

Was this helpful?

A common issue I've seen recently is where Magento cron jobs aren't being executed successfully (so transactional emails don't get sent and so on). The cron job executes when you run it from the command prompt, but not when you run it via the cron.

The fix is to edit the Magento public_html/cron.php file, and find these lines:-

 

$isShellDisabled = is_array($disabledFuncs) ? in_array('shell_exec', $disabledFuncs) : true;

$isShellDisabled = (stripos(PHP_OS, 'win') === false) ? $isShellDisabled : true;

 

And then add this line immediately below those to read:-

 

$isShellDisabled = true;

 

When you now execute the cron job, e.g.

/usr/bin/php-5.4 /var/sites/d/domain.com/public_html/cron.php

 

It should now execute successfully.

To monitor whether the cron is working successfully or not, there is a very good module called AOE Scheduler which you can get here:-

http://www.magentocommerce.com/magento-connect/aoe-scheduler.html

Still can't find what you're looking for?

That's not a problem. Our 24/7 customer support team are friendly and waiting to help answer your questions. The easiest way to get in touch is to raise a support ticket; simply click the button below.

Open Support Ticket