Magento Cron Not Working

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

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

403 Forbidden - Why is my website not working?

A "403 Forbidden' error means that the web server does not have the appropriate permissions to...

Remove the '.gridhosted.co.uk' preview URL from a Wordpress site

When you've finished building your Wordpress site and pointed your domain's DNS to the Cloud,...

Powered by WHMCompleteSolution