PendingEventAttributes
class PendingEventAttributes mixin Schedule
Traits
Constants
| DEFERRED_EVENT_METHODS |
Event lifecycle and output methods that should be deferred and replayed on each event in the group. |
Properties
| string | $expression | The cron expression representing the event's frequency. |
from ManagesAttributes |
| int|null | $repeatSeconds | How often to repeat the event during a minute. |
from ManagesAttributes |
| DateTimeZone|string|null | $timezone | The timezone the date should be evaluated on. |
from ManagesAttributes |
| array | $environments | The list of environments the command should run under. |
from ManagesAttributes |
| bool | $evenInMaintenanceMode | Indicates if the command should run in maintenance mode. |
from ManagesAttributes |
| bool | $evenWhenPaused | Indicates if the command should run even when the scheduler is paused. |
from ManagesAttributes |
| bool | $withoutOverlapping | Indicates if the command should not overlap itself. |
from ManagesAttributes |
| bool | $releaseOnTerminationSignals | Indicates if the mutex should be released when the process receives a termination signal. |
from ManagesAttributes |
| bool | $onOneServer | Indicates if the command should only be allowed to run on one server for each cron expression. |
from ManagesAttributes |
| int | $expiresAt | The number of minutes the mutex should be valid. |
from ManagesAttributes |
| bool | $runInBackground | Indicates if the command should run in the background. |
from ManagesAttributes |
| protected array | $filters | The array of filter callbacks. |
from ManagesAttributes |
| protected array | $rejects | The array of reject callbacks. |
from ManagesAttributes |
| string|null | $description | The human-readable description of the event. |
from ManagesAttributes |
| array | $attributes | The arbitrary attributes stored with the event. |
from ManagesAttributes |
| protected array<int, array{string, array}> | $macros | The recorded macro and deferred method calls to replay on each event. |
Methods
Limit the environments the command should run in.
State that the command should run even in maintenance mode.
State that the command should run even when the scheduler is paused.
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.
Register a callback to further filter the schedule.
Register a callback to further filter the schedule.
Set the human-friendly description of the event.
Set the human-friendly description of the event.
Set arbitrary attributes to store with the event.
The Cron expression representing the event's frequency.
Schedule the event to run between start and end time.
Schedule the event to not run between start and end time.
Schedule the event to run every two seconds.
Schedule the event to run every five seconds.
Schedule the event to run every ten seconds.
Schedule the event to run every fifteen seconds.
Schedule the event to run every twenty seconds.
Schedule the event to run every thirty seconds.
Schedule the event to run multiple times per minute.
Schedule the event to run every two minutes.
Schedule the event to run every three minutes.
Schedule the event to run every four minutes.
Schedule the event to run every five minutes.
Schedule the event to run every ten minutes.
Schedule the event to run every fifteen minutes.
Schedule the event to run every thirty minutes.
Schedule the event to run hourly at a given offset in the hour.
Schedule the event to run every odd hour.
Schedule the event to run every two hours.
Schedule the event to run every three hours.
Schedule the event to run every four hours.
Schedule the event to run every six hours.
Schedule the event to run daily at a given time (10:00, 19:30, etc).
Schedule the event to run twice daily.
Schedule the event to run twice daily at a given offset.
Schedule the event to run at the given minutes and hours.
Schedule the event to run only on Wednesdays.
Schedule the event to run weekly on a given day and time.
Schedule the event to run monthly on a given day and time.
Schedule the event to run twice monthly at a given time.
Schedule the event to run on the last day of the month.
Schedule the event to run on specific days of the month.
Schedule the event to run quarterly on a given day and time.
Schedule the event to run yearly on a given month, day, and time.
Set the days of the week the command should run on.
Splice the given value into the given position of the expression.
Proxy missing methods onto the underlying schedule.
Details
in
ManagesAttributes at line 92
ManagesAttributes
environments(mixed $environments)
Limit the environments the command should run in.
in
ManagesAttributes at line 102
ManagesAttributes
evenInMaintenanceMode()
State that the command should run even in maintenance mode.
in
ManagesAttributes at line 112
ManagesAttributes
evenWhenPaused()
State that the command should run even when the scheduler is paused.
at line 64
PendingEventAttributes
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.
in
ManagesAttributes at line 140
ManagesAttributes
onOneServer()
Allow the event to only run on one server for each cron expression.
in
ManagesAttributes at line 150
ManagesAttributes
runInBackground()
State that the command should run in the background.
in
ManagesAttributes at line 160
ManagesAttributes
when(bool|callable $callback)
Register a callback to further filter the schedule.
in
ManagesAttributes at line 172
ManagesAttributes
skip(bool|callable $callback)
Register a callback to further filter the schedule.
in
ManagesAttributes at line 184
ManagesAttributes
name(string $description)
Set the human-friendly description of the event.
in
ManagesAttributes at line 192
ManagesAttributes
description(string $description)
Set the human-friendly description of the event.
in
ManagesAttributes at line 202
ManagesAttributes
withAttributes(array $attributes)
Set arbitrary attributes to store with the event.
in
ManagesFrequencies at line 20
ManagesFrequencies
cron(string $expression)
The Cron expression representing the event's frequency.
in
ManagesFrequencies at line 30
ManagesFrequencies
between(string $startTime, string $endTime)
Schedule the event to run between start and end time.
in
ManagesFrequencies at line 38
ManagesFrequencies
unlessBetween(string $startTime, string $endTime)
Schedule the event to not run between start and end time.
in
ManagesFrequencies at line 70
ManagesFrequencies
everySecond()
Schedule the event to run every second.
in
ManagesFrequencies at line 78
ManagesFrequencies
everyTwoSeconds()
Schedule the event to run every two seconds.
in
ManagesFrequencies at line 86
ManagesFrequencies
everyFiveSeconds()
Schedule the event to run every five seconds.
in
ManagesFrequencies at line 94
ManagesFrequencies
everyTenSeconds()
Schedule the event to run every ten seconds.
in
ManagesFrequencies at line 102
ManagesFrequencies
everyFifteenSeconds()
Schedule the event to run every fifteen seconds.
in
ManagesFrequencies at line 110
ManagesFrequencies
everyTwentySeconds()
Schedule the event to run every twenty seconds.
in
ManagesFrequencies at line 118
ManagesFrequencies
everyThirtySeconds()
Schedule the event to run every thirty seconds.
in
ManagesFrequencies at line 130
protected ManagesFrequencies
repeatEvery(int $seconds)
Schedule the event to run multiple times per minute.
in
ManagesFrequencies at line 148
ManagesFrequencies
everyMinute()
Schedule the event to run every minute.
in
ManagesFrequencies at line 156
ManagesFrequencies
everyTwoMinutes()
Schedule the event to run every two minutes.
in
ManagesFrequencies at line 164
ManagesFrequencies
everyThreeMinutes()
Schedule the event to run every three minutes.
in
ManagesFrequencies at line 172
ManagesFrequencies
everyFourMinutes()
Schedule the event to run every four minutes.
in
ManagesFrequencies at line 180
ManagesFrequencies
everyFiveMinutes()
Schedule the event to run every five minutes.
in
ManagesFrequencies at line 188
ManagesFrequencies
everyTenMinutes()
Schedule the event to run every ten minutes.
in
ManagesFrequencies at line 196
ManagesFrequencies
everyFifteenMinutes()
Schedule the event to run every fifteen minutes.
in
ManagesFrequencies at line 204
ManagesFrequencies
everyThirtyMinutes()
Schedule the event to run every thirty minutes.
in
ManagesFrequencies at line 212
ManagesFrequencies
hourly()
Schedule the event to run hourly.
in
ManagesFrequencies at line 222
ManagesFrequencies
hourlyAt(array|int|string $offset)
Schedule the event to run hourly at a given offset in the hour.
in
ManagesFrequencies at line 230
ManagesFrequencies
everyOddHour(array|int|string $offset = 0)
Schedule the event to run every odd hour.
in
ManagesFrequencies at line 238
ManagesFrequencies
everyTwoHours(array|int|string $offset = 0)
Schedule the event to run every two hours.
in
ManagesFrequencies at line 246
ManagesFrequencies
everyThreeHours(array|int|string $offset = 0)
Schedule the event to run every three hours.
in
ManagesFrequencies at line 254
ManagesFrequencies
everyFourHours(array|int|string $offset = 0)
Schedule the event to run every four hours.
in
ManagesFrequencies at line 262
ManagesFrequencies
everySixHours(array|int|string $offset = 0)
Schedule the event to run every six hours.
in
ManagesFrequencies at line 270
ManagesFrequencies
daily()
Schedule the event to run daily.
in
ManagesFrequencies at line 278
ManagesFrequencies
at(string $time)
Schedule the command at a given time.
in
ManagesFrequencies at line 286
ManagesFrequencies
dailyAt(string $time)
Schedule the event to run daily at a given time (10:00, 19:30, etc).
in
ManagesFrequencies at line 302
ManagesFrequencies
twiceDaily(int $first = 1, int $second = 13)
Schedule the event to run twice daily.
in
ManagesFrequencies at line 314
ManagesFrequencies
twiceDailyAt(int $first = 1, int $second = 13, int $offset = 0)
Schedule the event to run twice daily at a given offset.
in
ManagesFrequencies at line 327
protected ManagesFrequencies
hourBasedSchedule(array|int|string $minutes, array|int|string $hours)
Schedule the event to run at the given minutes and hours.
in
ManagesFrequencies at line 340
ManagesFrequencies
weekdays()
Schedule the event to run only on weekdays.
in
ManagesFrequencies at line 348
ManagesFrequencies
weekends()
Schedule the event to run only on weekends.
in
ManagesFrequencies at line 356
ManagesFrequencies
mondays()
Schedule the event to run only on Mondays.
in
ManagesFrequencies at line 364
ManagesFrequencies
tuesdays()
Schedule the event to run only on Tuesdays.
in
ManagesFrequencies at line 372
ManagesFrequencies
wednesdays()
Schedule the event to run only on Wednesdays.
in
ManagesFrequencies at line 380
ManagesFrequencies
thursdays()
Schedule the event to run only on Thursdays.
in
ManagesFrequencies at line 388
ManagesFrequencies
fridays()
Schedule the event to run only on Fridays.
in
ManagesFrequencies at line 396
ManagesFrequencies
saturdays()
Schedule the event to run only on Saturdays.
in
ManagesFrequencies at line 404
ManagesFrequencies
sundays()
Schedule the event to run only on Sundays.
in
ManagesFrequencies at line 412
ManagesFrequencies
weekly()
Schedule the event to run weekly.
in
ManagesFrequencies at line 422
ManagesFrequencies
weeklyOn(mixed $dayOfWeek, string $time = '0:0')
Schedule the event to run weekly on a given day and time.
in
ManagesFrequencies at line 432
ManagesFrequencies
monthly()
Schedule the event to run monthly.
in
ManagesFrequencies at line 444
ManagesFrequencies
monthlyOn(int $dayOfMonth = 1, string $time = '0:0')
Schedule the event to run monthly on a given day and time.
in
ManagesFrequencies at line 457
ManagesFrequencies
twiceMonthly(int $first = 1, int $second = 16, string $time = '0:0')
Schedule the event to run twice monthly at a given time.
in
ManagesFrequencies at line 469
ManagesFrequencies
lastDayOfMonth(string $time = '0:0')
Schedule the event to run on the last day of the month.
in
ManagesFrequencies at line 481
ManagesFrequencies
daysOfMonth(int|array ...$days)
Schedule the event to run on specific days of the month.
in
ManagesFrequencies at line 494
ManagesFrequencies
quarterly()
Schedule the event to run quarterly.
in
ManagesFrequencies at line 505
ManagesFrequencies
quarterlyOn(int $dayOfQuarter = 1, string $time = '0:0')
Schedule the event to run quarterly on a given day and time.
in
ManagesFrequencies at line 516
ManagesFrequencies
yearly()
Schedule the event to run yearly.
in
ManagesFrequencies at line 527
ManagesFrequencies
yearlyOn(int $month = 1, int|string $dayOfMonth = 1, string $time = '0:0')
Schedule the event to run yearly on a given month, day, and time.
in
ManagesFrequencies at line 538
ManagesFrequencies
days(mixed $days)
Set the days of the week the command should run on.
in
ManagesFrequencies at line 548
ManagesFrequencies
timezone(DateTimeZone|UnitEnum|string $timezone)
Set the timezone the date should be evaluated on.
in
ManagesFrequencies at line 560
protected ManagesFrequencies
spliceIntoPosition(int $position, int|string $value)
Splice the given value into the given position of the expression.
at line 54
__construct(Schedule $schedule)
Create a new pending event attributes instance.
at line 78
void
mergeAttributes(Event $event)
Merge the current attributes into the given event.
at line 135
mixed
__call(string $method, array $parameters)
Proxy missing methods onto the underlying schedule.