Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AutomatedCron.php

function AutomatedCron::__construct

Constructs a new automated cron runner.

Parameters

\Drupal\Core\CronInterface $cron: The cron service.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\Drupal\Core\State\StateInterface $state: The state key-value store service.

File

core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php, line 48

Class

AutomatedCron
A subscriber running cron after a response is sent.

Namespace

Drupal\automated_cron\EventSubscriber

Code

public function __construct(CronInterface $cron, ConfigFactoryInterface $config_factory, StateInterface $state) {
    $this->cron = $cron;
    $this->config = $config_factory->get('automated_cron.settings');
    $this->state = $state;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal