function hook_cron_job_scheduler_info in Job Scheduler 7.2
Same name and namespace in other branches
- 8.3 job_scheduler.api.php \hook_cron_job_scheduler_info()
- 8.2 job_scheduler.api.php \hook_cron_job_scheduler_info()
- 7 job_scheduler.api.php \hook_cron_job_scheduler_info()
Declare job scheduling holding items that need to be run periodically.
Return value
array An associative array where the key is the queue name and the value is again an associative array. Possible keys are:
- 'worker callback': The name of the function to call. It will be called at schedule time.
- 'queue name': The name of the queue to use to queue this task. Must contain a valid queue name, declared by hook_cron_queue_info().
If queue name is given, worker callback will be ignored.
- 'jobs': (optional) An array defining jobs for this scheduler. The key is immaterial. Each job item is itself a job array, whose properties should be the same as the parameter to JobScheduler::set().
See also
hook_cron_job_scheduler_info_alter()
1 function implements hook_cron_job_scheduler_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- job_scheduler_trigger_cron_job_scheduler_info in modules/
job_scheduler_trigger/ job_scheduler_trigger.module - Implements hook_job_scheduler_info().
1 invocation of hook_cron_job_scheduler_info()
- job_scheduler_info in ./
job_scheduler.module - Collects and returns scheduler info.
File
- ./
job_scheduler.api.php, line 27 - API documentation for hooks.
Code
function hook_cron_job_scheduler_info() {
$info = array();
$info['example_reset'] = array(
'worker callback' => 'example_cache_clear_worker',
);
$info['example_import'] = array(
'queue name' => 'example_import_queue',
);
return $info;
}