What is Quartz? (什么是Quartz?)
Quartz is a full-featured, open source job scheduling system that can be integrated with, or used along side virtually any J2EE or J2SE application - from the smallest stand-alone application to the largest e-commerce system. Quartz can be used to create simple or complex schedules for executing tens, hundreds, or even tens-of-thousands of jobs; jobs whose tasks are defined as standard Java components or EJBs. The Quartz Scheduler includes many enterprise-class features, such as JTA transactions and clustering.
Quartz 是一個(gè)功能齊全的、開源的job時(shí)間調(diào)度系統(tǒng),它可以被結(jié)合的,或者伴隨虛擬的任何J2EE或J2SE程序-從最小的獨(dú)立的應(yīng)用程序到最大的e-commerce系統(tǒng)被使用。Quartz可以用來(lái)創(chuàng)建簡(jiǎn)單或復(fù)雜的時(shí)間調(diào)度來(lái)執(zhí)行十、百、千、甚至上萬(wàn)的jobs;獲得的job被定義為一個(gè)標(biāo)準(zhǔn)的java組件或EJBs. 這個(gè)Quartz 時(shí)間調(diào)度包含很多企業(yè)類的特征,例如JTA事務(wù)和簇。
The licensing of Quartz versions 1.0 through 1.4.5 is similar to both the BSD and ASF (Apache) public licenses, which means it's free for use, even within commercial products.
Quartz 1.0版本到1.4.5版本的licensing 是類似與BSD和ASF(apache)公共licenses, 它意味著可以免費(fèi)使用,甚至使用在商業(yè)產(chǎn)品中使用。
With the upcoming release of version 1.5.0, Quartz is moving to the Apache 2.0 license.
伴隨1.5.0版本的發(fā)布,Quartz將轉(zhuǎn)移向apache 2.0 的license.
What can Quartz do for you? (Quartz可以為你做什么?)
If your application has tasks that need to occur at given moments in time, or if your system has recurring maintenance jobs then Quartz may be your ideal solution.
如果你的程序有一些這樣的任務(wù),它需要及時(shí)地發(fā)生在給定時(shí)間,或者你如果你的系統(tǒng)有連續(xù)維護(hù)jobs,那么Quartz可以成為你的理想的解決方案。
Sample uses of job scheduling with Quartz:
Quartz使用job時(shí)間調(diào)度的范例
Driving Workflow: As a new order is initially placed, schedule a Job to fire in exactly 2 hours, that will check the status of that order, and trigger a warning notification if an order confirmation message has not yet been received for the order, as well as changing the order's status to 'awaiting intervention'.
System Maintenance: Schedule a job to dump the contents of a database into an XML file every business day (all weekdays except holidays) at 11:30 PM.
工作流驅(qū)動(dòng):作為一個(gè)新的訂單被初始化放置,調(diào)度一個(gè)job去工作在正好兩個(gè)小時(shí)內(nèi),它將檢查訂單的狀態(tài),并且觸發(fā)一個(gè)警告通知如果訂單確認(rèn)信息沒(méi)有被接收,又改變訂單的狀態(tài)到"等待干涉"。
系統(tǒng)維護(hù):調(diào)度一個(gè)job來(lái)將數(shù)據(jù)庫(kù)轉(zhuǎn)化為XML文件 每商業(yè)日期(所有周末除了節(jié)假日)在下午11:30。