Documentation

Schedule
in package

Job schedule class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
1.2.0

Table of Contents

$daysOfTheMonth  : array<string|int, mixed>
Days of the month
$daysOfTheWeek  : array<string|int, mixed>
Days of the week
$hours  : array<string|int, mixed>
Hours
$job  : AbstractJob
The job the schedule belongs to
$minutes  : array<string|int, mixed>
Minutes
$months  : array<string|int, mixed>
Months
$runUntil  : int|string
Run until property
$timezone  : string
Timezone
__construct()  : mixed
Constructor
between()  : Schedule
Set job schedule to between two hours
cron()  : Schedule
Set job schedule to custom cron schedule
daily()  : Schedule
Set job schedule to daily
dailyAt()  : Schedule
Set job schedule to daily at specific time, i.e. 14:30
every10Minutes()  : Schedule
Set job schedule to every 10 minutes
every15Minutes()  : Schedule
Set job schedule to every 15 minutes
every20Minutes()  : Schedule
Set job schedule to every 20 minutes
every30Minutes()  : Schedule
Set job schedule to every 30 minutes
every5Minutes()  : Schedule
Set job schedule to every 5 minutes
everyMinute()  : Schedule
Set job schedule to every minute
fridays()  : Schedule
Set job schedule to Fridays
getDaysOfTheMonth()  : array<string|int, mixed>
Get days of the month
getDaysOfTheWeek()  : array<string|int, mixed>
Get days of the week
getHours()  : array<string|int, mixed>
Get hours
getJob()  : AbstractJob
Get job
getMinutes()  : array<string|int, mixed>
Get minutes
getMonths()  : array<string|int, mixed>
Get months
getRunUntil()  : int|string
Get run until value
getTimezone()  : string
Get job timezone
hasJob()  : bool
Has job
hasRunUntil()  : bool
Has run until
hourly()  : Schedule
Set job schedule to hourly
isDue()  : bool
Determine if the schedule is due
isExpired()  : bool
Determine if the schedule is expired
minutes()  : Schedule
Set job schedule to by specific minutes
mondays()  : Schedule
Set job schedule to Mondays
monthly()  : Schedule
Set job schedule to monthly
quarterly()  : Schedule
Set job schedule to quarterly
runUntil()  : Schedule
Set the run until property
saturdays()  : Schedule
Set job schedule to Saturdays
setJob()  : Schedule
Set job
setTimezone()  : Schedule
Set job timezone
sundays()  : Schedule
Set job schedule to Sundays
thursdays()  : Schedule
Set job schedule to Thursdays
tuesdays()  : Schedule
Set job schedule to Tuesdays
wednesdays()  : Schedule
Set job schedule to Wednesdays
weekdays()  : Schedule
Set job schedule to weekdays
weekends()  : Schedule
Set job schedule to weekends
weekly()  : Schedule
Set job schedule to weekly
yearly()  : Schedule
Set job schedule to yearly
isSatisfied()  : bool
Determine if the value satisfies the expression

Properties

$daysOfTheMonth

Days of the month

protected array<string|int, mixed> $daysOfTheMonth = []

$daysOfTheWeek

Days of the week

protected array<string|int, mixed> $daysOfTheWeek = []

$hours

Hours

protected array<string|int, mixed> $hours = []

$minutes

Minutes

protected array<string|int, mixed> $minutes = []

$months

Months

protected array<string|int, mixed> $months = []

$runUntil

Run until property

protected int|string $runUntil = null

$timezone

Timezone

protected string $timezone = null

Methods

__construct()

Constructor

public __construct([AbstractJob $job = null ][, string $timezone = null ]) : mixed

Instantiate the job schedule object

Parameters
$job : AbstractJob = null
$timezone : string = null
Return values
mixed

between()

Set job schedule to between two hours

public between(int $start, int $end) : Schedule
Parameters
$start : int
$end : int
Return values
Schedule

cron()

Set job schedule to custom cron schedule

public cron(mixed $cronSchedule) : Schedule

min hour dom month dow


Parameters
$cronSchedule : mixed
Return values
Schedule

daily()

Set job schedule to daily

public daily(mixed $hours[, mixed $minute = null ]) : Schedule
Parameters
$hours : mixed
$minute : mixed = null
Return values
Schedule

dailyAt()

Set job schedule to daily at specific time, i.e. 14:30

public dailyAt(string $time) : Schedule
Parameters
$time : string
Return values
Schedule

getDaysOfTheMonth()

Get days of the month

public getDaysOfTheMonth() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDaysOfTheWeek()

Get days of the week

public getDaysOfTheWeek() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHours()

Get hours

public getHours() : array<string|int, mixed>
Return values
array<string|int, mixed>

getMinutes()

Get minutes

public getMinutes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getMonths()

Get months

public getMonths() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRunUntil()

Get run until value

public getRunUntil() : int|string
Return values
int|string

getTimezone()

Get job timezone

public getTimezone() : string
Return values
string

hasJob()

Has job

public hasJob() : bool
Return values
bool

hasRunUntil()

Has run until

public hasRunUntil() : bool
Return values
bool

hourly()

Set job schedule to hourly

public hourly([mixed $minute = null ]) : Schedule
Parameters
$minute : mixed = null
Return values
Schedule

isDue()

Determine if the schedule is due

public isDue() : bool
Return values
bool

isExpired()

Determine if the schedule is expired

public isExpired([int $attempts = null ]) : bool
Parameters
$attempts : int = null
Return values
bool

minutes()

Set job schedule to by specific minutes

public minutes(mixed $minutes) : Schedule
Parameters
$minutes : mixed
Return values
Schedule

monthly()

Set job schedule to monthly

public monthly(mixed $day[, mixed $hours = null ][, mixed $minute = null ]) : Schedule
Parameters
$day : mixed
$hours : mixed = null
$minute : mixed = null
Return values
Schedule

quarterly()

Set job schedule to quarterly

public quarterly([mixed $hours = null ][, mixed $minute = null ]) : Schedule
Parameters
$hours : mixed = null
$minute : mixed = null
Return values
Schedule

runUntil()

Set the run until property

public runUntil(int|string $runUntil) : Schedule
Parameters
$runUntil : int|string
Return values
Schedule

setTimezone()

Set job timezone

public setTimezone(string $timezone) : Schedule
Parameters
$timezone : string
Return values
Schedule

weekly()

Set job schedule to weekly

public weekly(mixed $day[, mixed $hours = null ][, mixed $minute = null ]) : Schedule
Parameters
$day : mixed
$hours : mixed = null
$minute : mixed = null
Return values
Schedule

yearly()

Set job schedule to yearly

public yearly([bool $endOfYear = false ][, mixed $hours = null ][, mixed $minute = null ]) : Schedule
Parameters
$endOfYear : bool = false
$hours : mixed = null
$minute : mixed = null
Return values
Schedule

isSatisfied()

Determine if the value satisfies the expression

protected isSatisfied(array<string|int, mixed> $values, mixed $value) : bool
Parameters
$values : array<string|int, mixed>
$value : mixed
Return values
bool

Search results