CronExpression::getMultipleRunDates()publicWC 1.0

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

Method of the class: CronExpression{}

No Hooks.


Array. Returns an array of run dates


$CronExpression = new CronExpression();
$CronExpression->getMultipleRunDates( $total, $currentTime, $invert, $allowCurrentDate );
$total(int) (required)
Set the total number of dates to calculate
(optional) Relative calculation date
Default: 'now'
(optional) Set to TRUE to retrieve previous dates
Default: false
(optional) Set to TRUE to return the
php current date if it matches the cron expression
Default: false

CronExpression::getMultipleRunDates() code WC 8.6.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;