You are here

function ultimate_cron_drush_command in Ultimate Cron 7

Same name and namespace in other branches
  1. 8.2 ultimate_cron.drush.inc \ultimate_cron_drush_command()
  2. 8 ultimate_cron.drush.inc \ultimate_cron_drush_command()
  3. 6 ultimate_cron.drush.inc \ultimate_cron_drush_command()
  4. 7.2 ultimate_cron.drush.inc \ultimate_cron_drush_command()

Implements hook_drush_command().

File

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

Code

function ultimate_cron_drush_command() {
  $items = array();
  $items['cron-list'] = array(
    'description' => "List cron jobs.",
    'arguments' => array(
      'type' => 'The type of jobs to list (all, running, enabled, disabled, unsafe)',
    ),
    'options' => array(
      'module' => 'Only show jobs from comma separated list of modules',
    ),
    'examples' => array(
      'drush cron-list running',
    ),
    'aliases' => array(
      'cl',
    ),
  );
  $items['cron-run'] = array(
    'description' => "Run cron job.",
    'arguments' => array(
      'function' => 'Function to run. Use "all" for running all jobs (default)',
    ),
    'options' => array(
      'cli' => "Don't spawn a background process through http",
      'check-rule' => "Check rule to determine if job should run",
      'logfile' => "File to log to when spawning cli processes",
    ),
    'examples' => array(
      'drush cron-run node_cron',
    ),
    'aliases' => array(
      'cr',
    ),
  );
  $items['cron-enable'] = array(
    'description' => "Enable cron job.",
    'arguments' => array(
      'function' => 'Function to enable',
    ),
    'examples' => array(
      'drush cron-enable node_cron',
    ),
    'aliases' => array(
      'ce',
    ),
  );
  $items['cron-disable'] = array(
    'description' => "Disable cron job.",
    'arguments' => array(
      'function' => 'Function to disable',
    ),
    'examples' => array(
      'drush cron-disable node_cron',
    ),
    'aliases' => array(
      'cd',
    ),
  );
  $items['cron-unlock'] = array(
    'description' => "Unlock cron job.",
    'arguments' => array(
      'function' => 'Function to unlock',
    ),
    'examples' => array(
      'drush cron-unlock node_cron',
    ),
    'aliases' => array(
      'cu',
    ),
  );
  return $items;
}