You are here

function drush_ultimate_cron_cron_job_get in Ultimate Cron 7.2

Get a cron jobs configuration.

File

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

Code

function drush_ultimate_cron_cron_job_get($name = NULL) {
  if (!$name) {
    return drush_set_error(dt('No job specified?'));
  }
  $job = _ultimate_cron_job_load($name);
  require_once drupal_get_path('module', 'ultimate_cron') . '/includes/nicejson.php';
  $settings = drush_get_option('fallback') ? $job
    ->getSettings() : $job->settings;
  $nicejson = json_format(drupal_json_encode($settings));
  drush_print($nicejson);
}