public function getPreviousRunDate($schedule, $currentTime = 'now', $nth = 0, $allowCurrentDate = false) { $cron = CronExpression::factory($schedule); return $cron->getPreviousRunDate($currentTime, $nth, $allowCurrentDate)->format('Y-m-d H:i:s'); }