/** * Return the next time a task should run. Determined by consulting this * trigger's cron expression compared with the lastCompleteTime. If the * lastCompleteTime is <code>null</code>, the current time is used. */ public Date getNextRunTime(Date lastScheduledRunTime, Date lastCompleteTime) { Date date = (lastCompleteTime != null) ? lastCompleteTime : new Date(); return this.cronSequenceGenerator.next(date); }