ManagesAttributes
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
Set which user the command should run as.
Limit the environments the command should run in.
State that the command should run even in maintenance mode.
Do not allow the event to overlap each other.
Allow the event to only run on one server for each cron expression.
State that the command should run in the background.
Set the human-friendly description of the event.
Set the human-friendly description of the event.
Details
$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.
The expiration time of the underlying cache lock may be specified in minutes.
$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.