Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Web Hosting FAQ  >  What to do if Cron Jobs do not run on Magento 1.8 After Upgrade?
Top Scroll

What to do if Cron Jobs do not run on Magento 1.8 After Upgrade?

 2 min

This article focuses on the solution to a problem that may occur after upgrading a Magento installation to version 1.8.

# What is the problem?

After upgrading a Magento installation to version 1.8 cron jobs, you will observe that it may not appear to run as expected. For example, you may see the following problems :

  • Newsletters are not visible.
  • Catalog price rules didn’t get updated.
  • Google sitemap doesn’t get generated.
  • Currency rates don’t get updated.
  • Customer alerts don’t get sent.

# Solution to the problem.

Perform the following steps to solve this problem :

1) Open the Magento cron.php file in a text editor file. To do this you can login to your account using SSH, or also if your account has cPanel then login using cPanel File Manager.

2) Place the following code block around line 45 :

$disabledFuncs = explode(',', ini_get('disable_functions'));

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

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

3) Now the following code and paste it after the code block you placed in the above step 2 :

$isShellDisabled = true;

4) Save these changes to the cron.php file and exit the text editor. The cron job will run correctly now.

Also Read :

Learn to run PHP Scripts from Cron jobs

How to Take the Cron Job Backups using JetBackup?

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
Claim the discount before it’s too late. Use the coupon code:
Note: Copy the coupon code and apply it on checkout.