javadatecroncronexpression

Is there any java class to get Date from cron expression


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 from given cron expression ?


Solution

  • You can check org.quartz.CronExpression It has a method named getNextValidTimeAfter which you can use.