Skip to content

Instantly share code, notes, and snippets.

@philoSurfer
Created June 5, 2015 18:22
Show Gist options
  • Save philoSurfer/7f07ea169da384b22996 to your computer and use it in GitHub Desktop.
Save philoSurfer/7f07ea169da384b22996 to your computer and use it in GitHub Desktop.
Drush cron
drush php-eval ' global $timers; $hook = 'cron'; $return = array(); $args = array(); foreach (module_implements($hook) as $module) { $function = $module . '_' . $hook; print($function ." - "); timer_start($function); $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