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?

Not a problem - our 24/7 customer support team are super friendly and here to help answer all your questions. There's no need to wait, click below to start a Live Chat.

Start Live Chat

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

Not a problem - our 24/7 customer support team are super friendly and here to help answer all your questions. Don't delay, click below to find out how you can get in touch.

Get in Touch