=== modified file 'includes/common.inc' --- includes/common.inc +++ includes/common.inc @@ -1704,23 +1704,22 @@ function drupal_cron_run() { } // Check if the last cron run completed - if (variable_get('cron_busy', FALSE)) { + if (variable_get('cron_start', FALSE) + 240 > time()) { watchdog('cron', t('Last cron run did not complete.'), WATCHDOG_WARNING); } else { - variable_set('cron_busy', TRUE); - } - - // Iterate through the modules calling their cron handlers (if any): - module_invoke_all('cron'); + variable_set('cron_start', time()); + // Iterate through the modules calling their cron handlers (if any): + module_invoke_all('cron'); + + // Clean up + variable_set('cron_start', 0); + variable_set('cron_last', time()); + watchdog('cron', t('Cron run completed.'), WATCHDOG_NOTICE); - // Clean up - variable_set('cron_busy', FALSE); - variable_set('cron_last', time()); - watchdog('cron', t('Cron run completed.'), WATCHDOG_NOTICE); - - // Return TRUE so other functions can check if it did run successfully - return TRUE; + // Return TRUE so other functions can check if it did run successfully + return TRUE; + } } /**