Closed RhodriM closed 10 years ago
You need to allow the current time to be returned by the function. See: https://github.com/mtdowling/cron-expression/blob/master/src/Cron/CronExpression.php#L172
$cron = Cron\CronExpression::factory('* * * * *');
echo $cron->getPreviousRunDate('now', 0, true)->format('Y-m-d H:i:s');
Thanks; sorry - not sure how I missed that param!
Hi,
When the following code:
is ran at 10:51:20 , the output is 2014-03-19 10:50:00.
Surely if the cron is scheduled to run every minute, the last run time should be 10:51:00?
Regards,
Rhodri