Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Recurring Class Reference
Inheritance diagram for Recurring:
InstallSchemaInterface

Public Member Functions

 __construct (\Magento\Cron\Model\ResourceModel\Schedule $schedule)
 
 install (SchemaSetupInterface $setup, ModuleContextInterface $context)
 

Detailed Description

Cron recurring setup

Definition at line 17 of file Recurring.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Cron\Model\ResourceModel\Schedule  $schedule)

Recurring constructor.

Parameters
\Magento\Cron\Model\ResourceModel\Schedule$schedule

Definition at line 28 of file Recurring.php.

30  {
31  $this->schedule = $schedule;
32  }

Member Function Documentation

◆ install()

install ( SchemaSetupInterface  $setup,
ModuleContextInterface  $context 
)

{Installs DB schema for a module

Parameters
SchemaSetupInterface$setup
ModuleContextInterface$context
Returns
void
}

Implements InstallSchemaInterface.

Definition at line 37 of file Recurring.php.

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  }
$connection
Definition: bulk.php:13

The documentation for this class was generated from the following file: