java - Cron Expression To List of Dates/Timepoints -


i wondering efficient way/best library parse cron expression , return list of time points in java.

for example have cron expression, say, fire every minute in october 2010 , list/array of epoch times (or other date format) returned correspond times trigger fires.

thanks

you use org.quartz.cronexpression.getnextvalidtimeafter() . using method can iteratively many trigger times wish.

you have decide starting point of iteration, current moment or epoch or smth else.

and can parse string cron expression org.quartz.cronexpression using constructor cronexpression(string cronexpression).

edit: can find similar functionality in spring framework's cronsequencegenerator. both used in similar iterative fashion check 1 suits best regarding performance etc.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -