Setting Up a CRON

Setting up a CRON

Magento has released its own instructions on setting up a CRON. Please follow the instructions at the URL below:

http://www.magentocommerce.com/knowledge-base/entry/ce18-and-ee113-installing#install-cron

Alternatively, if you have access to cPanel, here is a good tutorial on setting up CRON from your cPanel.

http://www.magentotutorials.co.uk/magento-cron-setup-in-cpanel

How to check whether CRON is running or not?

  1. Point your browser to http://[your-domain]/cron.php. If the browser is able to locate and execute it, the permissions are set properly.
  2. Check the timestamp of Last Sync
    1. In Magento Admin Panel, Go to System → Configuration
    2. Open Search Configuration under Klevu
    3. Select storeview from “Current Configuration Scope”
    4. Find Product Sync Settings panel
    5. Check time of the Last Run
    6. If it is too old and does not match with your cron schedule, there might be something wrong with your CRON setup or product sync

If you are on Mangeto version 1.8 or above:

There is a possibility that CRON is still not working after setting it up. To solve this, please check the following:

  1. Open the Magento cron.php file in a text editor. You can do this by logging in to your account using SSH, or if your account includes cPanel, from the cPanel File Manager
  2. Locate 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. Copy the following line of code and paste it after the code block above


    $isShellDisabled = true;

  4. Save the changes to the cron.php file. The CRON should run now correctly.