jwallace.us

tech, tunes, and other stuff

Drupal: Fixing the "Cron Already Running" Problem

When trying to run a status report in Drupal you might get the error: “Attempting to re-run cron while it is already running.” in your logs. The best way I’ve found to fix the problem, is to go into the Drupal includes directory, and edit the common.inc file. Look for the following code (at line 2667 in Drupal 6.15):

// Fetch the cron semaphore
$semaphore = variable_get('cron_semaphore', FALSE);  

Change it to the following and re-run the status report:

// Fetch the cron semaphore
// $semaphore = variable_get('cron_semaphore', FALSE);
$semaphore = FALSE;

This will allow the status report to run without the previous error. After the status report finishes, change the code back to the way it was & you’re done.