Révision 082b75eb
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/job_scheduler/job_scheduler.api.php | ||
---|---|---|
8 | 8 |
/** |
9 | 9 |
* Declare job scheduling holding items that need to be run periodically. |
10 | 10 |
* |
11 |
* @return |
|
11 |
* @return array
|
|
12 | 12 |
* An associative array where the key is the queue name and the value is |
13 | 13 |
* again an associative array. Possible keys are: |
14 | 14 |
* - 'worker callback': The name of the function to call. It will be called |
... | ... | |
16 | 16 |
* - 'queue name': The name of the queue to use to queue this task. Must |
17 | 17 |
* contain a valid queue name, declared by hook_cron_queue_info(). |
18 | 18 |
* If queue name is given, worker callback will be ignored. |
19 |
* - 'jobs': (optional) An array defining jobs for this scheduler. The key is |
|
20 |
* immaterial. Each job item is itself a job array, whose properties should |
|
21 |
* be the same as the parameter to JobScheduler::set(). |
|
19 | 22 |
* |
20 | 23 |
* @see hook_cron_job_scheduler_info_alter() |
21 | 24 |
* @see hook_cron_queue_info() |
... | ... | |
43 | 46 |
* |
44 | 47 |
* @see hook_cron_queue_info() |
45 | 48 |
* @see drupal_cron_run() |
49 |
* |
|
50 |
* @codingStandardsIgnoreStart |
|
46 | 51 |
*/ |
47 | 52 |
function hook_cron_job_scheduler_info_alter(&$info) { |
48 |
// Replace the default callback 'example_cache_clear_worker' |
|
53 |
// @codingStandardsIgnoreEnd |
|
54 |
// Replace the default callback 'example_cache_clear_worker'. |
|
49 | 55 |
$info['example_reset']['worker callback'] = 'my_custom_reset'; |
50 | 56 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules