Skip to content

Schedule

  • Full name: \Codefy\Framework\Scheduler\Schedule

Constants

Constant Visibility Type Value
SUNDAY public 0
MONDAY public 1
TUESDAY public 2
WEDNESDAY public 3
THURSDAY public 4
FRIDAY public 5
SATURDAY public 6

Properties

processors

protected \Codefy\Framework\Scheduler\Processor\Processor[] $processors

executedProcessors

public array $executedProcessors

failedProcessors

public array $failedProcessors

dispatcher

public \Psr\EventDispatcher\EventDispatcherInterface $dispatcher

timeZone

public \Qubus\Support\DateTime\QubusDateTimeZone $timeZone

mutex

public \Codefy\Framework\Scheduler\Mutex\Locker $mutex

Methods

__construct

public __construct(\Psr\EventDispatcher\EventDispatcherInterface $dispatcher, \Qubus\Support\DateTime\QubusDateTimeZone $timeZone, \Codefy\Framework\Scheduler\Mutex\Locker $mutex): mixed

Parameters:

Parameter Type Description
$dispatcher \Psr\EventDispatcher\EventDispatcherInterface
$timeZone \Qubus\Support\DateTime\QubusDateTimeZone
$mutex \Codefy\Framework\Scheduler\Mutex\Locker

queueProcessor

Add a single Processor to the stack.

public queueProcessor(\Codefy\Framework\Scheduler\Processor\Processor $processor): self

Parameters:

Parameter Type Description
$processor \Codefy\Framework\Scheduler\Processor\Processor

command

public command(callable|string $command, array $args = []): \Codefy\Framework\Scheduler\Processor\Shell|\Codefy\Framework\Scheduler\Processor\Callback

Parameters:

Parameter Type Description
$command callable|string
$args array

php

public php(string $script, ?string $bin = null, array $args = []): \Codefy\Framework\Scheduler\Processor\Shell

Parameters:

Parameter Type Description
$script string
$bin ?string
$args array

task

public task(\Codefy\Framework\Scheduler\Task $task, array $options = []): \Codefy\Framework\Scheduler\BaseTask

Parameters:

Parameter Type Description
$task \Codefy\Framework\Scheduler\Task
$options array

Throws:


allProcessors

public allProcessors(): \Codefy\Framework\Scheduler\Processor\Processor[]

dueProcessors

Get all the processors on the schedule that are due.

public dueProcessors(): \Codefy\Framework\Scheduler\Processor\Processor[]

run

public run(): void

resetRun

Reset all collected data of last run.

public resetRun(): static

Call before run() if you call run() multiple times.


pushExecutedProcessor

Push a successfully executed process.

private pushExecutedProcessor(\Codefy\Framework\Scheduler\Processor\Processor $processor): \Codefy\Framework\Scheduler\Processor\Processor

Parameters:

Parameter Type Description
$processor \Codefy\Framework\Scheduler\Processor\Processor

pushFailedProcessor

Push a failed process.

private pushFailedProcessor(\Codefy\Framework\Scheduler\Processor\Processor $processor, \Exception $ex): \Codefy\Framework\Scheduler\Processor\Processor

Parameters:

Parameter Type Description
$processor \Codefy\Framework\Scheduler\Processor\Processor
$ex \Exception

compileArguments

Compile the Task command.

protected compileArguments(array $args = []): string

Parameters:

Parameter Type Description
$args array

Inherited methods

alias

public alias(?string $literal): \Cron\CronExpression

Parameters:

Parameter Type Description
$literal ?string

Throws:



Automatically generated on 2025-10-13