TimeTrex API Manual

Cron
in package

Table of Contents

$limits  : mixed
arrayToScheduleString()  : bool|string
getNextScheduleDate()  : false|int|null
getOptions()  : array<string|int, mixed>|bool
isScheduledToRun()  : bool
isValidLimit()  : bool
parseScheduleString()  : array<string|int, mixed>
Parses any column into a complete list of entries.

Properties

$limits

protected static mixed $limits = ['minute' => ['min' => 0, 'max' => 59], 'hour' => ['min' => 0, 'max' => 23], 'day_of_month' => ['min' => 1, 'max' => 31], 'month' => ['min' => 1, 'max' => 12], 'day_of_week' => ['min' => 0, 'max' => 7]]

Methods

arrayToScheduleString()

public static arrayToScheduleString( $arr,  $type) : bool|string
Parameters
$arr :
$type :
Return values
bool|string

getNextScheduleDate()

public static getNextScheduleDate( $min_col,  $hour_col,  $dom_col,  $month_col,  $dow_col[, int $epoch = null ]) : false|int|null
Parameters
$min_col :
$hour_col :
$dom_col :
$month_col :
$dow_col :
$epoch : int = null

EPOCH

Return values
false|int|null

getOptions()

public static getOptions( $name[, int $interval = 1 ]) : array<string|int, mixed>|bool
Parameters
$name :
$interval : int = 1
Return values
array<string|int, mixed>|bool

isScheduledToRun()

public static isScheduledToRun( $min_col,  $hour_col,  $dom_col,  $month_col,  $dow_col[, int $epoch = null ][, int $last_run_date = null ]) : bool
Parameters
$min_col :
$hour_col :
$dom_col :
$month_col :
$dow_col :
$epoch : int = null

EPOCH

$last_run_date : int = null

EPOCH

Return values
bool

isValidLimit()

public static isValidLimit( $value_arr,  $type) : bool
Parameters
$value_arr :
$type :
Return values
bool

parseScheduleString()

Parses any column into a complete list of entries.

public static parseScheduleString( $str,  $type) : array<string|int, mixed>

ie: converts: 0-59 to an array of: 0, 1, 2, 3, 4, 5, 6, ... 0-2, 16, 18 to array of 0, 1, 2, 16, 18 /2 to array of 0, 2, 4, 6, 8, ...

Parameters
$str :
$type :
Return values
array<string|int, mixed>

Search results