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.

string|null $user

The user the command should run as.

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 when the scheduler is paused.

bool $withoutOverlapping

Indicates if the command should not overlap itself.

bool $releaseOnTerminationSignals

Indicates if the event mutex should be released on termination signals.

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 assigned to the event.

Methods

user(string $user)

Set which user the command should run as.

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 95
ManagesAttributes user(string $user)

Set which user the command should run as.

Parameters

string $user

Return Value

ManagesAttributes

at line 107
ManagesAttributes environments(mixed $environments)

Limit the environments the command should run in.

Parameters

mixed $environments

Return Value

ManagesAttributes

at line 117
ManagesAttributes evenInMaintenanceMode()

State that the command should run even in maintenance mode.

Return Value

ManagesAttributes

at line 127
ManagesAttributes evenWhenPaused()

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

Return Value

ManagesAttributes

at line 138
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 154
ManagesAttributes onOneServer()

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

Return Value

ManagesAttributes

at line 164
ManagesAttributes runInBackground()

State that the command should run in the background.

Return Value

ManagesAttributes

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

Register a callback to further filter the schedule.

Parameters

bool|callable $callback

Return Value

ManagesAttributes

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

Register a callback to further filter the schedule.

Parameters

bool|callable $callback

Return Value

ManagesAttributes

at line 198
ManagesAttributes name(string $description)

Set the human-friendly description of the event.

Parameters

string $description

Return Value

ManagesAttributes

at line 206
ManagesAttributes description(string $description)

Set the human-friendly description of the event.

Parameters

string $description

Return Value

ManagesAttributes

at line 216
ManagesAttributes withAttributes(array $attributes)

Set arbitrary attributes to store with the event.

Parameters

array $attributes

Return Value

ManagesAttributes