You are here

function ultimate_cron_drush_command_alter in Ultimate Cron 7.2

Implements hook_drush_command_alter().

File

./ultimate_cron.drush.inc, line 135
Drush commands for Ultimate Cron!

Code

function ultimate_cron_drush_command_alter(&$command) {

  // Let's hijack the core cron command.
  if ($command['command'] == 'core-cron') {
    $command['command-hook'] = 'cron-run';
    $command['commandfile'] = 'ultimate_cron';
    $command['path'] = drupal_get_path('module', 'ultimate_cron');
    $command['callback'] = 'drush_ultimate_cron_cron_run';
    if (!variable_get('ultimate_cron_check_schedule_on_core_cron', FALSE)) {
      drush_set_option('force', TRUE);
    }
  }
}