Skip to content

Instantly share code, notes, and snippets.

@woombo
Forked from djun-kim/gist:f211ef5d056696dafd4b
Last active August 29, 2015 14:16
Show Gist options
  • Save woombo/8d859b12c41fc2ca926a to your computer and use it in GitHub Desktop.
Save woombo/8d859b12c41fc2ca926a to your computer and use it in GitHub Desktop.
# http://www.millwoodonline.co.uk/blog/drupal-cron-failing-not-sure-why-heres-handy-drush-command
drush php-eval ' global $timers; $hook = 'cron'; $return = array(); foreach (module_implements($hook) as $module) { $function = $module . '_' . $hook; print($function ." - "); timer_start($function); $args = array(); $result = call_user_func_array($function, $args); 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"); }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment