trait ManagesAttributes

Properties

string $expression

The cron expression representing the event's frequency.

int|null $repeatSeconds

How often to repeat the event during a minute.

DateTimeZone|string|null $timezone

The timezone the date should be evaluated on.

array $environments

The list of environments the command should run under.

bool $evenInMaintenanceMode

Indicates if the command should run in maintenance mode.

bool $evenWhenPaused

Indicates if the command should run even when the scheduler is paused.

bool $withoutOverlapping

Indicates if the command should not overlap itself.

bool $releaseOnTerminationSignals

Indicates if the mutex should be released when the process receives a termination signal.

bool $onOneServer

Indicates if the command should only be allowed to run on one server for each cron expression.

int $expiresAt

The number of minutes the mutex should be valid.

bool $runInBackground

Indicates if the command should run in the background.

protected array $filters

The array of filter callbacks.

protected array $rejects

The array of reject callbacks.

string|null $description

The human-readable description of the event.

array $attributes

The arbitrary attributes stored with the event.

Methods

environments(mixed $environments)

Limit the environments the command should run in.

evenInMaintenanceMode()

State that the command should run even in maintenance mode.

evenWhenPaused()

State that the command should run even when the scheduler is paused.

withoutOverlapping(int $expiresAt = 1440, bool $releaseOnTerminationSignals = true)

Do not allow the event to overlap each other.

onOneServer()

Allow the event to only run on one server for each cron expression.

runInBackground()

State that the command should run in the background.

when(bool|callable $callback)

Register a callback to further filter the schedule.

skip(bool|callable $callback)

Register a callback to further filter the schedule.

name(string $description)

Set the human-friendly description of the event.

description(string $description)

Set the human-friendly description of the event.

withAttributes(array $attributes)

Set arbitrary attributes to store with the event.

Details

at line 92
ManagesAttributes environments(mixed $environments)

Limit the environments the command should run in.

Parameters

mixed $environments

Return Value

ManagesAttributes

at line 102
ManagesAttributes evenInMaintenanceMode()

State that the command should run even in maintenance mode.

Return Value

ManagesAttributes

at line 112
ManagesAttributes evenWhenPaused()

State that the command should run even when the scheduler is paused.

Return Value

ManagesAttributes

at line 124
ManagesAttributes withoutOverlapping(int $expiresAt = 1440, bool $releaseOnTerminationSignals = true)

Do not allow the event to overlap each other.

The expiration time of the underlying cache lock may be specified in minutes.

Parameters

int $expiresAt
bool $releaseOnTerminationSignals

Return Value

ManagesAttributes

at line 140
ManagesAttributes onOneServer()

Allow the event to only run on one server for each cron expression.

Return Value

ManagesAttributes

at line 150
ManagesAttributes runInBackground()

State that the command should run in the background.

Return Value

ManagesAttributes

at line 160
ManagesAttributes when(bool|callable $callback)

Register a callback to further filter the schedule.

Parameters

bool|callable $callback

Return Value

ManagesAttributes

at line 172
ManagesAttributes skip(bool|callable $callback)

Register a callback to further filter the schedule.

Parameters

bool|callable $callback

Return Value

ManagesAttributes

at line 184
ManagesAttributes name(string $description)

Set the human-friendly description of the event.

Parameters

string $description

Return Value

ManagesAttributes

at line 192
ManagesAttributes description(string $description)

Set the human-friendly description of the event.

Parameters

string $description

Return Value

ManagesAttributes

at line 202
ManagesAttributes withAttributes(array $attributes)

Set arbitrary attributes to store with the event.

Parameters

array $attributes

Return Value

ManagesAttributes