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
executedProcessors
failedProcessors
dispatcher
timeZone
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.
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
dueProcessors
Get all the processors on the schedule that are due.
run
resetRun
Reset all collected data of last run.
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.
Parameters:
Parameter | Type | Description |
---|---|---|
$args | array |
Inherited methods
alias
Parameters:
Parameter | Type | Description |
---|---|---|
$literal | ?string |
Throws:
Automatically generated on 2025-10-13