Luntbuild: config build schedule using Quartz 使用Quartz配置build安排

Categories: Development Notes; Tagged with: ; @ March 24th, 2012 21:20

Quartz is a full-featured, open source job scheduling service that can be integrated with, or used along side
virtually any Java EE or Java SE 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 that are
programmed to fulfill the requirements of your application. The Quartz Scheduler includes many
enterprise-class features, such as JTA transactions and clustering.

Many organization and frameworks are using Quartz, Jboss, Spring, and Luntbuild, Quartz Scheduler is licensed under the Apache License, Version 2.0 http://www.quartz-scheduler.org/overview/license-and-copyright

And here is a introduction of CronTrigger: http://www.quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/crontrigger

 

How to set the cron expression in Luntbuild: http://luntbuild.javaforge.com/manual/guide/ch14s02.html


 

Here are some full examples:

**Expression**

**Meaning**

0 0 12 * * ?

Fire at 12pm (noon) every day

0 15 10 ? * *

Fire at 10:15am every day

0 15 10 * * ?

Fire at 10:15am every day

0 15 10 * * ? *

Fire at 10:15am every day

0 15 10 * * ? 2005

Fire at 10:15am every day during the year 2005

0 * 14 * * ?

Fire every minute starting at 2pm and ending at 2:59pm, every day

0 0/5 14 * * ?

Fire every 5 minutes starting at 2pm and ending at 2:55pm, every day

0 0/5 14,18 * * ?

Fire every 5 minutes starting at 2pm and ending at 2:55pm, AND fire every 5 minutes starting at 6pm and ending at 6:55pm, every day

0 0-5 14 * * ?

Fire every minute starting at 2pm and ending at 2:05pm, every day

0 10,44 14 ? 3 WED

Fire at 2:10pm and at 2:44pm every Wednesday in the month of March.

0 15 10 ? * MON-FRI

Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday

0 15 10 15 * ?

Fire at 10:15am on the 15th day of every month

0 15 10 L * ?

Fire at 10:15am on the last day of every month

0 15 10 L-2 * ?

Fire at 10:15am on the 2nd-to-last last day of every month

0 15 10 ? * 6L

Fire at 10:15am on the last Friday of every month

0 15 10 ? * 6L

Fire at 10:15am on the last Friday of every month

0 15 10 ? * 6L 2002-2005

Fire at 10:15am on every last friday of every month during the years 2002, 2003, 2004 and 2005

0 15 10 ? * 6#3

Fire at 10:15am on the third Friday of every month

0 0 12 1/5 * ?

Fire at 12pm (noon) every 5 days every month, starting on the first day of the month.

0 11 11 11 11 ?

Fire every November 11th at 11:11am.

Pay attention to the effects of ‘?’ and ‘*’ in the day-of-week and day-of-month fields!

<->



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.