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 是一個功能齊全的、開源的job時間調度系統,它可以被結合的,或者伴隨虛擬的任何J2EE或J2SE程序-從最小的獨立的應用程序到最大的e-commerce系統被使用。Quartz可以用來創建簡單或復雜的時間調度來執行十、百、千、甚至上萬的jobs;獲得的job被定義為一個標準的java組件或EJBs. 這個Quartz 時間調度包含很多企業類的特征,例如JTA事務和簇。
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, 它意味著可以免費使用,甚至使用在商業產品中使用。
With the upcoming release of version 1.5.0, Quartz is moving to the Apache 2.0 license.
伴隨1.5.0版本的發布,Quartz將轉移向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.
如果你的程序有一些這樣的任務,它需要及時地發生在給定時間,或者你如果你的系統有連續維護jobs,那么Quartz可以成為你的理想的解決方案。
Sample uses of job scheduling with Quartz:
Quartz使用job時間調度的范例
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.
工作流驅動:作為一個新的訂單被初始化放置,調度一個job去工作在正好兩個小時內,它將檢查訂單的狀態,并且觸發一個警告通知如果訂單確認信息沒有被接收,又改變訂單的狀態到"等待干涉"。
系統維護:調度一個job來將數據庫轉化為XML文件 每商業日期(所有周末除了節假日)在下午11:30。