PHP Класс Bolt\Cron

To create a listener you need to something similar in your class: use Bolt\Events\CronEvents; $this->app['dispatcher']->addListener(CronEvents::CRON_INTERVAL, [$this, 'myJobCallbackMethod']); CRON_INTERVAL should be replace with one of the following: * CRON_HOURLY * CRON_DAILY * CRON_WEEKLY * CRON_MONTHLY * CRON_YEARLY
Автор: Gawain Lynch ([email protected])
Наследование: extends Symfony\Component\EventDispatcher\Event
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$lastruns array

Защищенные свойства (Protected)

Свойство Тип Описание
$repository Bolt\Storage\Repository\CronRepository

Открытые методы

Метод Описание
__construct ( Silex\Application $app, Symfony\Component\Console\Output\OutputInterface $output = null ) Constructor.
execute ( array $param = [] ) : boolean Run the jobs.

Приватные методы

Метод Описание
executeSingle ( CronEvent $event, string $interimName, array $data ) Run a single cron dispatcher.
getNextRunTime ( string $interimName, Bolt\Storage\Entity\Cron $runEntity ) : DateTime Get the next run time for a given interim.
getRunTimes ( ) Query table for last run time of each interim.
getScheduleThreshold ( ) Get our configured hour and convert it to UNIX time.
handleError ( Exception $e, string $interimName ) Provide feedback on exceptions in cron jobs.
isExecutable ( string $interimName ) : boolean Test whether or not to call dispatcher.
notify ( string $message ) If we're passed an OutputInterface, we're called from Nut and can notify the end user.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Silex\Application $app, Symfony\Component\Console\Output\OutputInterface $output = null )
$app Silex\Application
$output Symfony\Component\Console\Output\OutputInterface

execute() публичный Метод

Run the jobs.
public execute ( array $param = [] ) : boolean
$param array
Результат boolean

Описание свойств

$lastruns публичное свойство

public array $lastruns
Результат array

$repository защищенное свойство

protected CronRepository,Bolt\Storage\Repository $repository
Результат Bolt\Storage\Repository\CronRepository