You are here

function elysia_cron_drush_command in Elysia Cron 6.2

Same name and namespace in other branches
  1. 5.2 elysia_cron.drush.inc \elysia_cron_drush_command()
  2. 5 elysia_cron.drush.inc \elysia_cron_drush_command()
  3. 6 elysia_cron.drush.inc \elysia_cron_drush_command()
  4. 7.2 elysia_cron.drush.inc \elysia_cron_drush_command()
  5. 7 elysia_cron.drush.inc \elysia_cron_drush_command()

Implementation of hook_drush_command().

File

./elysia_cron.drush.inc, line 39

Code

function elysia_cron_drush_command() {
  $items = array();
  $items['elysia-cron'] = array(
    'description' => "Run all cron tasks in all active modules for specified site using elysia cron system. This replaces the standard \"core-cron\" drush handler.",
    // TODO dt
    'callback' => 'drush_elysia_cron_run_wrapper',
    'arguments' => array(
      'op' => 'Operation: list, run, disable, enable',
      'target' => 'Target of operation (optional): usually a task name or a channel name starting with "@"',
    ),
    'examples' => array(
      'elysia-cron run' => 'Run all cron tasks in all active modules (as the standard "core-cron")',
      'elysia-cron run --verbose' => 'Run all cron tasks in verbose mode',
      'elysia-cron run @channel' => 'Run all cron tasks in specified channel',
      'elysia-cron run search_cron --ignore-time' => 'Run only search index build task (force execution)',
      'elysia-cron list --elysia-cron-verbose' => 'List all channels/tasks in verbose mode',
      'elysia-cron disable search_cron' => 'Disable search index build task',
    ),
    'options' => array(
      'quiet' => 'suppress all output',
      'verbose' => 'enable extended output',
      'elysia-cron-verbose' => 'enable extended output (the same as --verbose, but without enabling drush verbose mode)',
      'ignore-disable' => 'run channels/tasks even if disabled',
      'ignore-time' => 'run channels/tasks even if not ready for execution',
      'ignore-running' => 'run channels/tasks even if already running',
    ),
  );
  return $items;
}