Skip to content

Instantly share code, notes, and snippets.

@Mihailoff
Created September 10, 2013 13:02

Revisions

  1. Mihailoff created this gist Sep 10, 2013.
    1 change: 1 addition & 0 deletions drupal-cron-debug.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    drush php-eval 'global $timers; $hook = 'cron'; $return = array(); foreach (module_implements($hook) as $module) { $function = $module . '_' . $hook; print($function ." - "); timer_start($function); $result = call_user_func_array($function, array()); if (isset($result) && is_array($result)) { $return = array_merge_recursive($return, $result); } else if (isset($result)) { $return[] = $result; } timer_stop($function); print($timers[$function]['time'] ."\r\n"); }'