Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Cron.php
Go to the documentation of this file.
1 <?php
7 
11 
12 class Cron
13 {
17  protected $config;
18 
22  protected $reportModulesInfo;
23 
27  protected $reportCounts;
28 
33 
42  public function __construct(
47  ) {
48  $this->config = $config;
49  $this->reportModulesInfo = $reportModulesInfo;
50  $this->reportCounts = $reportCounts;
51  $this->reportNewRelicCron = $reportNewRelicCron;
52  }
53 
59  public function runCron()
60  {
61  if ($this->config->isCronEnabled()) {
62  $this->reportNewRelicCron->report();
63  $this->reportModulesInfo->report();
64  $this->reportCounts->report();
65  }
66 
67  return $this;
68  }
69 }
__construct(Config $config, ReportModulesInfo $reportModulesInfo, ReportCounts $reportCounts, ReportNewRelicCron $reportNewRelicCron)
Definition: Cron.php:42