Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Recurring.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
13 
18 {
22  private $schedule;
23 
28  public function __construct(
29  \Magento\Cron\Model\ResourceModel\Schedule $schedule
30  ) {
31  $this->schedule = $schedule;
32  }
33 
38  {
39  $connection = $this->schedule->getConnection();
40  $connection->update(
41  $this->schedule->getMainTable(),
42  [
44  'messages' => 'The job is terminated due to system upgrade'
45  ],
46  $connection->quoteInto('status = ?', \Magento\Cron\Model\Schedule::STATUS_RUNNING)
47  );
48  }
49 }
install(SchemaSetupInterface $setup, ModuleContextInterface $context)
Definition: Recurring.php:37
$setup
Definition: trigger.php:12
__construct(\Magento\Cron\Model\ResourceModel\Schedule $schedule)
Definition: Recurring.php:28
$connection
Definition: bulk.php:13