Skip to content

Processor


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

Methods

mutexName

Unique name to use for a mutually exclusive lock.

public mutexName(): string

maxRuntime

public maxRuntime(): int

description

Set a command description.

public description(string $description): self

Parameters:

Parameter Type Description
$description string

canRunCommandInBackground

Check if the command can run in background.

public canRunCommandInBackground(): bool

canRunOnlyOneInstance

Check if process con only have one instance.

public canRunOnlyOneInstance(): bool

getExpression

Gets the current cron expression for the task.

public getExpression(): ?string

isDue

Determine if the given command should run based on the Cron expression.

public isDue(string|\DateTimeZone|null $timeZone = null): bool

Parameters:

Parameter Type Description
$timeZone string|\DateTimeZone|null

run

public run(): mixed

getCommand

Returns the command.

public getCommand(): callable|string