QueueWorker::$cron

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Annotation/QueueWorker.php \Drupal\Core\Annotation\QueueWorker::cron
  2. 8.9.x core/lib/Drupal/Core/Annotation/QueueWorker.php \Drupal\Core\Annotation\QueueWorker::cron
  3. 10 core/lib/Drupal/Core/Annotation/QueueWorker.php \Drupal\Core\Annotation\QueueWorker::cron

An optional associative array of settings for cron.

The array has one key, time, which is set to the time Drupal cron should spend on calling this worker in seconds. The default is set in \Drupal\Core\Queue\QueueWorkerManager::processDefinition().

Type: array

See also

\Drupal\Core\Queue\QueueWorkerManager::processDefinition()

File

core/lib/Drupal/Core/Annotation/QueueWorker.php, line 66

Class

QueueWorker
Declare a worker class for processing a queue item.

Namespace

Drupal\Core\Annotation

Code

public $cron;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.