Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to schedule Quartz threads to run each second?

Is it possible to have Java Quartz threads run each second, or even by milliseconds? It seems like they can only run by the minute and nothing less.

like image 297
stevebot Avatar asked Jan 19 '11 18:01

stevebot


1 Answers

Yes, you can make them run every second.

Take a look at TriggerUtils.makeSecondlyTrigger:

Make a trigger that will fire every second, indefinitely.

Or use a CronTrigger:

new CronTrigger("cronTrigger","group","* * * * * ?"); //fire at every second daily
like image 84
dogbane Avatar answered Oct 12 '22 21:10

dogbane