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 FROM variable WHERE name="cron_last";
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.
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 menuOptimize 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.
thank you
ReplyDeletemy cron is ok now
I'm glad it helped you :)
ReplyDeleteNice one.
ReplyDeleteIts working for me...
I also had to clean my search_index table because it was huge (uninstall and install search module)
ReplyDeleteand clean boost cache.
And then it worked, thank you!
I'm glas it helped you! Some times Drupal tables need some maintenance and cleanup, like optimizing them
ReplyDeletecron run failed in drupal 7.22 & drupal 7.23
ReplyDeleteThanks, it solved my Cron problem :)
ReplyDeletei dont have "cron_semaphore"
ReplyDelete"cron_last"
and still field :(
did you solve it?
ReplyDeleteIn 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
1st off all find common.inc file on include folder than i edit it like this but its not working
ReplyDeleteI see you have another problem,mmm.. One solution could be:
ReplyDeleteMake 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
Thank you so much!
ReplyDelete