Drupal Cron Failed To Run Solved

Drupal Cron should run everyday and I was doing some maintenance in one Drupal site when the message "cron failed to run" appeared and here is how I've solve it:

Delete cron variables from the database

DELETE FROM variable WHERE name="cron_semaphore";
DELETE FROM variable WHERE name="cron_last";

Empty cache

Empty cache from /admin/settings/performance and Flush all caches from the administration menu

Optimize all tables

Go to phpmyadmin and check all the tables in your database, select Optimize tables and execute it, wait till is over.
Optimize table is something you should do every now and then to keep the database healthy, it helps to rebuild all the indexes of the Myisam tables.

Then launch cron: cron run successfully.

Comments

  1. thank you
    my cron is ok now

    ReplyDelete
  2. Nice one.

    Its working for me...

    ReplyDelete
  3. I also had to clean my search_index table because it was huge (uninstall and install search module)

    and clean boost cache.

    And then it worked, thank you!

    ReplyDelete
  4. I'm glas it helped you! Some times Drupal tables need some maintenance and cleanup, like optimizing them

    ReplyDelete
  5. cron run failed in drupal 7.22 & drupal 7.23

    ReplyDelete
  6. Thanks, it solved my Cron problem :)

    ReplyDelete
  7. i dont have "cron_semaphore"
    "cron_last"

    and still field :(

    ReplyDelete
  8. did you solve it?
    In Extreme cases you can disable the semaphore entirely:
    in common.inc drupal_cron_run()
    //$semaphore = variable_get('cron_semaphore', FALSE);
    $semaphore = FALSE;

    but watch out with this, make a copy of the file first, check and correct errors and then restore the original file

    ReplyDelete
  9. 1st off all find common.inc file on include folder than i edit it like this but its not working

    ReplyDelete
  10. I see you have another problem,mmm.. One solution could be:

    Make a copy of your site and data base and install it in your computer, on a local Apache serve, then edit the file settings.php and add these lines at the top:

    error_reporting(E_ALL);
    ini_set('display_errors', TRUE);
    ini_set('display_startup_errors', TRUE);

    Next run cron from your computer like this:
    Open your browser and go http://mylocalhost/cron.php

    All errors should be printed on the screen now



    ReplyDelete
  11. Thank you so much!

    ReplyDelete

Post a Comment

Your opinion is very appreciated, thank you!

Popular posts from this blog

Repair Dolce Gusto Circolo Leaking Problem

Root Nook Simple Touch with updated NookManager

How to Change the Gear Shift Knob of the Peugeot 306