Skip to content

Commit

Permalink
Do not fail on isDue. Closes #60
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed Jan 11, 2015
1 parent 736d495 commit fd92e88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Cron/CronExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ public function isDue($currentTime = 'now')
$currentTime = $currentTime->getTimeStamp();
}

return $this->getNextRunDate($currentDate, 0, true)->getTimestamp() == $currentTime;
try {
return $this->getNextRunDate($currentDate, 0, true)->getTimestamp() == $currentTime;
} catch (\Exception $e) {
return false;
}
}

/**
Expand Down

0 comments on commit fd92e88

Please sign in to comment.