trait Illuminate / Console / Scheduling / ManagesFrequencies
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

ManagesFrequencies

Methods

public

cron ( $expression ) : $this

The Cron expression representing the event's frequency.

Parameters

  • $expression string
public

between ( $startTime , $endTime ) : $this

Schedule the event to run between start and end time.

Parameters

  • $startTime string
  • $endTime string
public

unlessBetween ( $startTime , $endTime ) : $this

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

Parameters

  • $startTime string
  • $endTime string
private

inTimeInterval ( $startTime , $endTime ) : Closure

Schedule the event to run between start and end time.

Parameters

  • $startTime string
  • $endTime string
public

everySecond ( ) : $this

Schedule the event to run every second.

public

everyTwoSeconds ( ) : $this

Schedule the event to run every two seconds.

public

everyFiveSeconds ( ) : $this

Schedule the event to run every five seconds.

public

everyTenSeconds ( ) : $this

Schedule the event to run every ten seconds.

public

everyFifteenSeconds ( ) : $this

Schedule the event to run every fifteen seconds.

public

everyTwentySeconds ( ) : $this

Schedule the event to run every twenty seconds.

public

everyThirtySeconds ( ) : $this

Schedule the event to run every thirty seconds.

protected

repeatEvery ( $seconds ) : $this

Schedule the event to run multiple times per minute.

Parameters

  • $seconds int
public

everyMinute ( ) : $this

Schedule the event to run every minute.

public

everyTwoMinutes ( ) : $this

Schedule the event to run every two minutes.

public

everyThreeMinutes ( ) : $this

Schedule the event to run every three minutes.

public

everyFourMinutes ( ) : $this

Schedule the event to run every four minutes.

public

everyFiveMinutes ( ) : $this

Schedule the event to run every five minutes.

public

everyTenMinutes ( ) : $this

Schedule the event to run every ten minutes.

public

everyFifteenMinutes ( ) : $this

Schedule the event to run every fifteen minutes.

public

everyThirtyMinutes ( ) : $this

Schedule the event to run every thirty minutes.

public

hourly ( ) : $this

Schedule the event to run hourly.

public

hourlyAt ( $offset ) : $this

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

Parameters

  • $offset array|string|int
public

everyOddHour ( $offset ) : $this

Schedule the event to run every odd hour.

Parameters

  • $offset array|string|int
public

everyTwoHours ( $offset ) : $this

Schedule the event to run every two hours.

Parameters

  • $offset array|string|int
public

everyThreeHours ( $offset ) : $this

Schedule the event to run every three hours.

Parameters

  • $offset array|string|int
public

everyFourHours ( $offset ) : $this

Schedule the event to run every four hours.

Parameters

  • $offset array|string|int
public

everySixHours ( $offset ) : $this

Schedule the event to run every six hours.

Parameters

  • $offset array|string|int
public

daily ( ) : $this

Schedule the event to run daily.

public

at ( $time ) : $this

Schedule the command at a given time.

Parameters

  • $time string
public

dailyAt ( $time ) : $this

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

Parameters

  • $time string
public

twiceDaily ( $first , $second ) : $this

Schedule the event to run twice daily.

Parameters

  • $first int
  • $second int
public

twiceDailyAt ( $first , $second , $offset ) : $this

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

Parameters

  • $first int
  • $second int
  • $offset int
protected

hourBasedSchedule ( $minutes , $hours ) : $this

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

Parameters

  • $minutes array|string|int
  • $hours array|string|int
public

weekdays ( ) : $this

Schedule the event to run only on weekdays.

public

weekends ( ) : $this

Schedule the event to run only on weekends.

public

mondays ( ) : $this

Schedule the event to run only on Mondays.

public

tuesdays ( ) : $this

Schedule the event to run only on Tuesdays.

public

wednesdays ( ) : $this

Schedule the event to run only on Wednesdays.

public

thursdays ( ) : $this

Schedule the event to run only on Thursdays.

public

fridays ( ) : $this

Schedule the event to run only on Fridays.

public

saturdays ( ) : $this

Schedule the event to run only on Saturdays.

public

sundays ( ) : $this

Schedule the event to run only on Sundays.

public

weekly ( ) : $this

Schedule the event to run weekly.

public

weeklyOn ( $dayOfWeek , $time ) : $this

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

Parameters

  • $dayOfWeek array|mixed
  • $time string
public

monthly ( ) : $this

Schedule the event to run monthly.

public

monthlyOn ( $dayOfMonth , $time ) : $this

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

Parameters

  • $dayOfMonth int
  • $time string
public

twiceMonthly ( $first , $second , $time ) : $this

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

Parameters

  • $first int
  • $second int
  • $time string
public

lastDayOfMonth ( $time ) : $this

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

Parameters

  • $time string
public

quarterly ( ) : $this

Schedule the event to run quarterly.

public

quarterlyOn ( $dayOfQuarter , $time ) : $this

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

Parameters

  • $dayOfQuarter int
  • $time int
public

yearly ( ) : $this

Schedule the event to run yearly.

public

yearlyOn ( $month , $dayOfMonth , $time ) : $this

Schedule the event to run yearly on a given month, day, and time.

Parameters

  • $month int
  • $dayOfMonth int|string
  • $time string
public

days ( $days ) : $this

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

Parameters

  • $days array|mixed
public

timezone ( $timezone ) : $this

Set the timezone the date should be evaluated on.

Parameters

protected

spliceIntoPosition ( $position , $value ) : $this

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

Parameters

  • $position int
  • $value string