Log in
Model

Schedule

Magento\Cron\Model\Schedule

What it does

This class represents a scheduled cron job in Magento 2, managing its execution lifecycle from pending to running to completed/error states.

Developers use it to create, validate, and execute scheduled tasks, parse cron expressions (e.g., '* 0-5 * * *'), and handle job locking to prevent concurrent execution of the same job.

Public Methods

  • _construct()
  • setCronExpr()
  • trySchedule()
  • matchCronExpression()
  • getNumeric()
  • tryLockJob()