Newscoop\SchedulerServiceInterface::getPreviousRunDate PHP Method

getPreviousRunDate() public method

Get a previous run date relative to the current date or a specific date
public getPreviousRunDate ( string $schedule, string | DateTime $currentTime = 'now', integer $nth, boolean $allowCurrentDate = false ) : string
$schedule string Cron job schedule expression
$currentTime string | DateTime (optional) Relative calculation date
$nth integer (optional) Number of matches to skip before returning
$allowCurrentDate boolean (optional) Set to TRUE to return the current date if it matches the cron expression
return string
    public function getPreviousRunDate($schedule, $currentTime = 'now', $nth = 0, $allowCurrentDate = false);