Skip to content
docsv0.1.1

TaskResult

The outcome of {@see CronRunner} executing one due {@see TaskDefinition}: whether its callback completed without throwing, how long it took, and — when it threw — the exception message. A task that was never due (see {@see CronRegistry::due()}) never gets a `TaskResult` at all; this only exists for tasks the runner actually invoked.

TaskResult::__construct()

public function __construct(string $name, bool $ok, float $seconds, ?string $error = null):

Parameters

Parameters of __construct()
NameTypeDescription
$namestring
$okbool
$secondsfloat
$error?string

TaskResult::toArray()

public function toArray(): array

La corrida de una tarea como dato: cuál, si pasó y qué dijo.