Runner
Runner
Task implementation for executing scheduled callable endpoints.
class Runner extends \Hazaar\Warlock\Agent\TaskExtends: Hazaar\Warlock\Agent\Task
Properties
when
public Cron $whenType: Hazaar\Util\Cron
interval
public int $intervalType: int
schedule
public Entry $scheduleType: Hazaar\Warlock\Agent\Schedule\Entry
occurrence
The scheduled occurrence the next execution represents. This is normally the same as $start, but for a
public int $occurrenceType: int
catch-up it is the missed occurrence. Retries don't change it.
catchup
True if the next execution is a catch-up of an occurrence missed while the agent was not running.
public bool $catchupType: bool
tracking
True while an execution is recorded in the schedule history as running, including its retries.
private bool $trackingType: bool
Methods
schedule
Schedules the task.
public schedule(int|string $when, ?int $interval): selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$when | int | string |
$interval | int | with a timestamp, repeat every this many seconds after it |
touch
Advances schedule and returns the next run timestamp.
public touch(): ?intReturns: int
start
Marks task execution start and updates running state metadata.
public start(): voidReturns: void
process
Records how a tracked execution finished, then advances the task as usual.
public process(): selfReturns: self
cancel
Records a tracked execution that is cancelled while it runs, e.g. when the agent shuts down, then cancels it.
public cancel(int $expire = 30): selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$expire | int |
run
public run(): selfReturns: self
processCommand
protected processCommand(PacketType $command, mixed $payload): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$command | Hazaar\Warlock\Enum\PacketType | |
$payload | mixed |
Generated by Hazaar API Doc Generator on Thu, 22 Oct 2026 05:05:31 +0000