I am writing a JEE JAX-RS application and I have ScheduleExpressions as a cron expression (* 1 * * *) configured in the database. In my post construct I am creating timer service to run job periodically.
Now I want to expose a rest URI to list all timer scheduled jobs which are scheduled to run for today.
Currently I am using the following way to find the next schedule time. Code: EJBCronTrigger trigger = new EJBCronTrigger(scheduleExpression); Date fireTimeAfter = trigger.getFireTimeAfter(new Date());
Can any one suggest any other better or recommended way to find the next schedule time from a ScheduleExpression. Is there any kind of library exists.