I need to find out the first occurrence of Date and time represented by given cron expression. Is there any java class, utility code which can help in getting data object fr
If you're using Spring you could use:
CronTrigger trigger = new CronTrigger(cron);
TriggerContext context = new TriggerContext() {
public Date lastScheduledExecutionTime() {
return null;
}
public Date lastActualExecutionTime() {
return null;
}
public Date lastCompletionTime() {
return null;
}
};
return trigger.nextExecutionTime(context);