trait ManagesAttributes (View source)

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 $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 $withoutOverlapping

Indicates if the command should not overlap itself.

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.

Methods

$this
user(string $user)

Set which user the command should run as.

$this
environments(array|mixed $environments)

Limit the environments the command should run in.

$this
evenInMaintenanceMode()

State that the command should run even in maintenance mode.

$this
withoutOverlapping(int $expiresAt = 1440)

Do not allow the event to overlap each other.

$this
onOneServer()

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

$this
runInBackground()

State that the command should run in the background.

$this
when(Closure|bool $callback)

Register a callback to further filter the schedule.

$this
skip(Closure|bool $callback)

Register a callback to further filter the schedule.

$this
name(string $description)

Set the human-friendly description of the event.

$this
description(string $description)

Set the human-friendly description of the event.

Details

$this user(string $user)

Set which user the command should run as.

Parameters

string $user

Return Value

$this

$this environments(array|mixed $environments)

Limit the environments the command should run in.

Parameters

array|mixed $environments

Return Value

$this

$this evenInMaintenanceMode()

State that the command should run even in maintenance mode.

Return Value

$this

$this withoutOverlapping(int $expiresAt = 1440)

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

Return Value

$this

$this onOneServer()

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

Return Value

$this

$this runInBackground()

State that the command should run in the background.

Return Value

$this

$this when(Closure|bool $callback)

Register a callback to further filter the schedule.

Parameters

Closure|bool $callback

Return Value

$this

$this skip(Closure|bool $callback)

Register a callback to further filter the schedule.

Parameters

Closure|bool $callback

Return Value

$this

$this name(string $description)

Set the human-friendly description of the event.

Parameters

string $description

Return Value

$this

$this description(string $description)

Set the human-friendly description of the event.

Parameters

string $description

Return Value

$this