trait ManagesFrequencies

Methods

cron(string $expression)

The Cron expression representing the event's frequency.

between(string $startTime, string $endTime)

Schedule the event to run between start and end time.

unlessBetween(string $startTime, string $endTime)

Schedule the event to not run between start and end time.

everySecond()

Schedule the event to run every second.

everyTwoSeconds()

Schedule the event to run every two seconds.

everyFiveSeconds()

Schedule the event to run every five seconds.

everyTenSeconds()

Schedule the event to run every ten seconds.

everyFifteenSeconds()

Schedule the event to run every fifteen seconds.

everyTwentySeconds()

Schedule the event to run every twenty seconds.

everyThirtySeconds()

Schedule the event to run every thirty seconds.

repeatEvery(int $seconds)

Schedule the event to run multiple times per minute.

everyMinute()

Schedule the event to run every minute.

everyTwoMinutes()

Schedule the event to run every two minutes.

everyThreeMinutes()

Schedule the event to run every three minutes.

everyFourMinutes()

Schedule the event to run every four minutes.

everyFiveMinutes()

Schedule the event to run every five minutes.

everyTenMinutes()

Schedule the event to run every ten minutes.

everyFifteenMinutes()

Schedule the event to run every fifteen minutes.

everyThirtyMinutes()

Schedule the event to run every thirty minutes.

hourly()

Schedule the event to run hourly.

hourlyAt(array|int|string $offset)

Schedule the event to run hourly at a given offset in the hour.

everyOddHour(array|int|string $offset = 0)

Schedule the event to run every odd hour.

everyTwoHours(array|int|string $offset = 0)

Schedule the event to run every two hours.

everyThreeHours(array|int|string $offset = 0)

Schedule the event to run every three hours.

everyFourHours(array|int|string $offset = 0)

Schedule the event to run every four hours.

everySixHours(array|int|string $offset = 0)

Schedule the event to run every six hours.

daily()

Schedule the event to run daily.

at(string $time)

Schedule the command at a given time.

dailyAt(string $time)

Schedule the event to run daily at a given time (10:00, 19:30, etc).

twiceDaily(int $first = 1, int $second = 13)

Schedule the event to run twice daily.

twiceDailyAt(int $first = 1, int $second = 13, int $offset = 0)

Schedule the event to run twice daily at a given offset.

hourBasedSchedule(array|int|string $minutes, array|int|string $hours)

Schedule the event to run at the given minutes and hours.

weekdays()

Schedule the event to run only on weekdays.

weekends()

Schedule the event to run only on weekends.

mondays()

Schedule the event to run only on Mondays.

tuesdays()

Schedule the event to run only on Tuesdays.

wednesdays()

Schedule the event to run only on Wednesdays.

thursdays()

Schedule the event to run only on Thursdays.

fridays()

Schedule the event to run only on Fridays.

saturdays()

Schedule the event to run only on Saturdays.

sundays()

Schedule the event to run only on Sundays.

weekly()

Schedule the event to run weekly.

weeklyOn(mixed $dayOfWeek, string $time = '0:0')

Schedule the event to run weekly on a given day and time.

monthly()

Schedule the event to run monthly.

monthlyOn(int $dayOfMonth = 1, string $time = '0:0')

Schedule the event to run monthly on a given day and time.

twiceMonthly(int $first = 1, int $second = 16, string $time = '0:0')

Schedule the event to run twice monthly at a given time.

lastDayOfMonth(string $time = '0:0')

Schedule the event to run on the last day of the month.

daysOfMonth(int|array ...$days)

Schedule the event to run on specific days of the month.

quarterly()

Schedule the event to run quarterly.

quarterlyOn(int $dayOfQuarter = 1, string $time = '0:0')

Schedule the event to run quarterly on a given day and time.

yearly()

Schedule the event to run yearly.

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.

days(mixed $days)

Set the days of the week the command should run on.

timezone(DateTimeZone|UnitEnum|string $timezone)

Set the timezone the date should be evaluated on.

spliceIntoPosition(int $position, int|string $value)

Splice the given value into the given position of the expression.

Details

at line 20
ManagesFrequencies cron(string $expression)

The Cron expression representing the event's frequency.

Parameters

string $expression

Return Value

ManagesFrequencies

at line 30
ManagesFrequencies between(string $startTime, string $endTime)

Schedule the event to run between start and end time.

Parameters

string $startTime
string $endTime

Return Value

ManagesFrequencies

at line 38
ManagesFrequencies unlessBetween(string $startTime, string $endTime)

Schedule the event to not run between start and end time.

Parameters

string $startTime
string $endTime

Return Value

ManagesFrequencies

at line 70
ManagesFrequencies everySecond()

Schedule the event to run every second.

Return Value

ManagesFrequencies

at line 78
ManagesFrequencies everyTwoSeconds()

Schedule the event to run every two seconds.

Return Value

ManagesFrequencies

at line 86
ManagesFrequencies everyFiveSeconds()

Schedule the event to run every five seconds.

Return Value

ManagesFrequencies

at line 94
ManagesFrequencies everyTenSeconds()

Schedule the event to run every ten seconds.

Return Value

ManagesFrequencies

at line 102
ManagesFrequencies everyFifteenSeconds()

Schedule the event to run every fifteen seconds.

Return Value

ManagesFrequencies

at line 110
ManagesFrequencies everyTwentySeconds()

Schedule the event to run every twenty seconds.

Return Value

ManagesFrequencies

at line 118
ManagesFrequencies everyThirtySeconds()

Schedule the event to run every thirty seconds.

Return Value

ManagesFrequencies

at line 128
protected ManagesFrequencies repeatEvery(int $seconds)

Schedule the event to run multiple times per minute.

Parameters

int $seconds

Return Value

ManagesFrequencies

at line 146
ManagesFrequencies everyMinute()

Schedule the event to run every minute.

Return Value

ManagesFrequencies

at line 154
ManagesFrequencies everyTwoMinutes()

Schedule the event to run every two minutes.

Return Value

ManagesFrequencies

at line 162
ManagesFrequencies everyThreeMinutes()

Schedule the event to run every three minutes.

Return Value

ManagesFrequencies

at line 170
ManagesFrequencies everyFourMinutes()

Schedule the event to run every four minutes.

Return Value

ManagesFrequencies

at line 178
ManagesFrequencies everyFiveMinutes()

Schedule the event to run every five minutes.

Return Value

ManagesFrequencies

at line 186
ManagesFrequencies everyTenMinutes()

Schedule the event to run every ten minutes.

Return Value

ManagesFrequencies

at line 194
ManagesFrequencies everyFifteenMinutes()

Schedule the event to run every fifteen minutes.

Return Value

ManagesFrequencies

at line 202
ManagesFrequencies everyThirtyMinutes()

Schedule the event to run every thirty minutes.

Return Value

ManagesFrequencies

at line 210
ManagesFrequencies hourly()

Schedule the event to run hourly.

Return Value

ManagesFrequencies

at line 220
ManagesFrequencies hourlyAt(array|int|string $offset)

Schedule the event to run hourly at a given offset in the hour.

Parameters

array|int|string $offset

Return Value

ManagesFrequencies

at line 228
ManagesFrequencies everyOddHour(array|int|string $offset = 0)

Schedule the event to run every odd hour.

Parameters

array|int|string $offset

Return Value

ManagesFrequencies

at line 236
ManagesFrequencies everyTwoHours(array|int|string $offset = 0)

Schedule the event to run every two hours.

Parameters

array|int|string $offset

Return Value

ManagesFrequencies

at line 244
ManagesFrequencies everyThreeHours(array|int|string $offset = 0)

Schedule the event to run every three hours.

Parameters

array|int|string $offset

Return Value

ManagesFrequencies

at line 252
ManagesFrequencies everyFourHours(array|int|string $offset = 0)

Schedule the event to run every four hours.

Parameters

array|int|string $offset

Return Value

ManagesFrequencies

at line 260
ManagesFrequencies everySixHours(array|int|string $offset = 0)

Schedule the event to run every six hours.

Parameters

array|int|string $offset

Return Value

ManagesFrequencies

at line 268
ManagesFrequencies daily()

Schedule the event to run daily.

Return Value

ManagesFrequencies

at line 276
ManagesFrequencies at(string $time)

Schedule the command at a given time.

Parameters

string $time

Return Value

ManagesFrequencies

at line 284
ManagesFrequencies dailyAt(string $time)

Schedule the event to run daily at a given time (10:00, 19:30, etc).

Parameters

string $time

Return Value

ManagesFrequencies

at line 300
ManagesFrequencies twiceDaily(int $first = 1, int $second = 13)

Schedule the event to run twice daily.

Parameters

int $first
int $second

Return Value

ManagesFrequencies

at line 312
ManagesFrequencies twiceDailyAt(int $first = 1, int $second = 13, int $offset = 0)

Schedule the event to run twice daily at a given offset.

Parameters

int $first
int $second
int $offset

Return Value

ManagesFrequencies

at line 325
protected hourBasedSchedule(array|int|string $minutes, array|int|string $hours)

Schedule the event to run at the given minutes and hours.

Parameters

array|int|string $minutes
array|int|string $hours

at line 338
ManagesFrequencies weekdays()

Schedule the event to run only on weekdays.

Return Value

ManagesFrequencies

at line 346
ManagesFrequencies weekends()

Schedule the event to run only on weekends.

Return Value

ManagesFrequencies

at line 354
ManagesFrequencies mondays()

Schedule the event to run only on Mondays.

Return Value

ManagesFrequencies

at line 362
ManagesFrequencies tuesdays()

Schedule the event to run only on Tuesdays.

Return Value

ManagesFrequencies

at line 370
ManagesFrequencies wednesdays()

Schedule the event to run only on Wednesdays.

Return Value

ManagesFrequencies

at line 378
ManagesFrequencies thursdays()

Schedule the event to run only on Thursdays.

Return Value

ManagesFrequencies

at line 386
ManagesFrequencies fridays()

Schedule the event to run only on Fridays.

Return Value

ManagesFrequencies

at line 394
ManagesFrequencies saturdays()

Schedule the event to run only on Saturdays.

Return Value

ManagesFrequencies

at line 402
ManagesFrequencies sundays()

Schedule the event to run only on Sundays.

Return Value

ManagesFrequencies

at line 410
ManagesFrequencies weekly()

Schedule the event to run weekly.

Return Value

ManagesFrequencies

at line 422
ManagesFrequencies weeklyOn(mixed $dayOfWeek, string $time = '0:0')

Schedule the event to run weekly on a given day and time.

Parameters

mixed $dayOfWeek
string $time

Return Value

ManagesFrequencies

at line 432
ManagesFrequencies monthly()

Schedule the event to run monthly.

Return Value

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.

Parameters

int $dayOfMonth
string $time

Return Value

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.

Parameters

int $first
int $second
string $time

Return Value

ManagesFrequencies

at line 469
ManagesFrequencies lastDayOfMonth(string $time = '0:0')

Schedule the event to run on the last day of the month.

Parameters

string $time

Return Value

ManagesFrequencies

at line 481
ManagesFrequencies daysOfMonth(int|array ...$days)

Schedule the event to run on specific days of the month.

Parameters

int|array ...$days

Return Value

ManagesFrequencies

at line 494
ManagesFrequencies quarterly()

Schedule the event to run quarterly.

Return Value

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.

Parameters

int $dayOfQuarter
string $time

Return Value

ManagesFrequencies

at line 516
ManagesFrequencies yearly()

Schedule the event to run yearly.

Return Value

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.

Parameters

int $month
int|string $dayOfMonth
string $time

Return Value

ManagesFrequencies

at line 540
ManagesFrequencies days(mixed $days)

Set the days of the week the command should run on.

Parameters

mixed $days

Return Value

ManagesFrequencies

at line 550
ManagesFrequencies timezone(DateTimeZone|UnitEnum|string $timezone)

Set the timezone the date should be evaluated on.

Parameters

DateTimeZone|UnitEnum|string $timezone

Return Value

ManagesFrequencies

at line 562
protected ManagesFrequencies spliceIntoPosition(int $position, int|string $value)

Splice the given value into the given position of the expression.

Parameters

int $position
int|string $value

Return Value

ManagesFrequencies