Skip to content

Commit fd92e88

Browse files
committed
Do not fail on isDue. Closes #60
1 parent 736d495 commit fd92e88

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Cron/CronExpression.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,11 @@ public function isDue($currentTime = 'now')
246246
$currentTime = $currentTime->getTimeStamp();
247247
}
248248

249-
return $this->getNextRunDate($currentDate, 0, true)->getTimestamp() == $currentTime;
249+
try {
250+
return $this->getNextRunDate($currentDate, 0, true)->getTimestamp() == $currentTime;
251+
} catch (\Exception $e) {
252+
return false;
253+
}
250254
}
251255

252256
/**

0 commit comments

Comments
 (0)