function ultimate_cron_drush_command in Ultimate Cron 8.2
Same name and namespace in other branches
- 8 ultimate_cron.drush.inc \ultimate_cron_drush_command()
- 6 ultimate_cron.drush.inc \ultimate_cron_drush_command()
- 7.2 ultimate_cron.drush.inc \ultimate_cron_drush_command()
- 7 ultimate_cron.drush.inc \ultimate_cron_drush_command()
Implements hook_drush_command().
File
- ./
ultimate_cron.drush.inc, line 12 - Drush commands for Ultimate Cron!
Code
function ultimate_cron_drush_command() {
$items = array();
$items['cron-logs'] = array(
'description' => 'Show a cron jobs logs',
'arguments' => array(
'name' => 'Job to show logs for',
),
'options' => array(
'limit' => 'Number of log entries to show',
'compact' => 'Only show the first line of each log entry',
),
'examples' => array(
'drush cron-logs node_cron --limit=20' => 'Show 20 last logs for the node_cron job',
),
);
$items['cron-list'] = array(
'description' => 'List cron jobs',
'options' => array(
'module' => 'Comma separated list of modules to show jobs from',
'enabled' => 'Show enabled jobs',
'disabled' => 'Show enabled jobs',
'behind' => 'Show jobs that are behind schedule',
'status' => 'Comma separated list of statuses to show jobs from',
'extended' => 'Show extended information',
'name' => 'Show name instead of title',
'scheduled' => 'Show scheduled jobs',
),
'examples' => array(
'drush cron-list --status=running --module=node' => 'Show jobs from the node module that are currently running',
),
'aliases' => array(
'cl',
),
);
$items['cron-run'] = array(
'description' => 'Run cron job',
'arguments' => array(
'name' => 'Job to run',
),
'options' => array(
'force' => 'Skip the schedule check for each job. Locks are still respected.',
'options' => 'Custom options for plugins, e.g. --options=thread=1 for serial launcher',
),
'examples' => array(
'drush cron-run node_cron' => 'Run the node_cron job',
'drush cron-run --options=thread=1' => 'Run all scheduled jobs and instruct serial launcher only to launch thread 1 jobs',
),
'aliases' => array(
'crun',
),
);
$items['cron-is-running'] = array(
'description' => 'Tell whether cron is running. Exit status is set in concordance with the cron running status.',
'examples' => array(
'drush cron-is-running' => 'Check if cron is running.',
'drush cron-is-running --quiet' => 'Check if cron is running and don\'t show an informative message.',
'while `drush cron-is-running --quiet`; do echo "Waiting cron to finish"; sleep 1; done' => 'Bash loop to wait until cron finishes.',
),
'aliases' => array(
'cir',
),
);
$items['cron-enable'] = array(
'description' => 'Enable cron job',
'arguments' => array(
'name' => 'Job to enable',
),
'options' => array(
'all' => 'Enabled all jobs',
),
'examples' => array(
'drush cron-enable node_cron' => 'Enable the node_cron job',
),
'aliases' => array(
'ce',
),
);
$items['cron-disable'] = array(
'description' => 'Disable cron job',
'arguments' => array(
'name' => 'Job to disable',
),
'options' => array(
'all' => 'Enabled all jobs',
),
'examples' => array(
'drush cron-disable node_cron' => 'Disable the node_cron job',
),
'aliases' => array(
'cd',
),
);
$items['cron-unlock'] = array(
'description' => 'Unlock cron job',
'arguments' => array(
'name' => 'Job to unlock',
),
'options' => array(
'all' => 'Enabled all jobs',
),
'examples' => array(
'drush cron-unlock node_cron' => 'Unlock the node_cron job',
),
'aliases' => array(
'cu',
),
);
return $items;
}