diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc index 2f877ac2d..cbfdabb19 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -5040,7 +5040,15 @@ function drupal_cron_run() { drupal_register_shutdown_function('drupal_cron_cleanup'); // Iterate through the modules calling their cron handlers (if any): - module_invoke_all('cron'); + foreach (module_implements('cron') as $module) { + // Do not let an exception thrown by one module disturb another. + try { + module_invoke($module, 'cron'); + } + catch (Exception $e) { + watchdog_exception('cron', $e); + } + } // Record cron time variable_set('cron_last', REQUEST_TIME); |