You are here

public function Cron::run in Commerce Recurring Framework 8

Runs the cron.

Overrides CronInterface::run

File

src/Cron.php, line 55

Class

Cron
Default cron implementation.

Namespace

Drupal\commerce_recurring

Code

public function run() {
  $queue_storage = $this->entityTypeManager
    ->getStorage('advancedqueue_queue');

  /** @var \Drupal\advancedqueue\Entity\QueueInterface $recurring_queue */
  $recurring_queue = $queue_storage
    ->load('commerce_recurring');
  $this
    ->enqueueOrders($recurring_queue);
  $this
    ->enqueueSubscriptions($recurring_queue);
}