Using Java util. Advantages and disadvantages of timer and quartz scheduling?

I have to write an application that performs a series of tasks:

>The task runs at 0200 hours every day. > The task will run once at 4 a.m. > run the task at 15 minute intervals starting from 0003 hours > run the task at 15 minute intervals starting from 0005 hours

Use normal Java util. What are the advantages and disadvantages of timer vs Quartz this?

Should I consider other alternatives?

Solution

quartz

>Additional dependencies > API is currently changing (late 2011): 1 X is going out, but it is the only one supported by spring and may be supported by others > work can be stored continuously; Multiple schedulers can be clustered to achieve load balancing and failover > the difference between job and trigger takes some time to adapt – but it may > more powerful repeated scheduling expressions (such as cronrigger for cron expressions)

timer

>Out of the box JSE 1.3 > may be enough for your functionality > less flexible, but less complex

I personally use quartz persistent storage for web applications, where triggers can be created interactively and should continue to use spring's scheduling abstraction after restart Both APIs, with all due respect, lack an important concept: retry failed tasks after a period of time Adding this for yourself is the pain of repeating the task, and you should try again

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>