CronExpression::getMultipleRunDates()publicWC 1.0

Get multiple run dates starting at the current date or a specific date

Метод класса: CronExpression{}

Хуков нет.


Массив. Returns an array of run dates


$CronExpression = new CronExpression();
$CronExpression->getMultipleRunDates( $total, $currentTime, $invert, $allowCurrentDate );
$total(int) (обязательный)
Set the total number of dates to calculate
(optional) Relative calculation date
По умолчанию: 'now'
(optional) Set to TRUE to retrieve previous dates
По умолчанию: false
(optional) Set to TRUE to return the
php current date if it matches the cron expression
По умолчанию: false

Код CronExpression::getMultipleRunDates() WC 8.3.1

public function getMultipleRunDates($total, $currentTime = 'now', $invert = false, $allowCurrentDate = false)
    $matches = array();
    for ($i = 0; $i < max(0, $total); $i++) {
        $matches[] = $this->getRunDate($currentTime, $i, $invert, $allowCurrentDate);

    return $matches;