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!
After install completed, we can crate new project for nightly build, for a luntbuild project, we need to configure it’s:
VCS adaptors; Builders;’ Schedules
VCS adaptors: specify the repository type, URL, userName and password, and we need to specify it’s modules(e.g. java projects in the repository). with those info, luntbuild can update codes before build.
Builders: we can set one or more builder, builder can be Ant or Maven. we need to specify the command and targets, and build success condition.
Schedules: we can create build schedules in this tab, there is one of the most import field is
‘Trigger type’, it can be manual, simple, cron;
Build Type: specify the build type, weather remove all code and update, or just update;
and also can specify the post-builders, like after builder success, we deploy the server;
we can manually start a builder.
Typically, when you trigger a builder manually, luntbuild will:
1. update codes from repository;
2. build the specified builders in the schedule;
3. run the post builders;
4. notify related users by Email, Jabber, Post, etc.( you can specify the properties in Home>Properties)
Here is an ‘getting started’ doc: Luntbuild – Quick Start Guide http://iwr-geclipse.fzk.de:8443/luntbuild/docs/quickstart/quickstart.html
(I guess it’s a official document)
About LuntBuild: http://luntbuild.javaforge.com/
I just installed Luntbuild, and I delpoy the luntbuild.war into a Tomcat 5.5 outside.
In the luntbuild_installation.txt, they mentioned the following servlet containers:
* Tomcat 4.x
* Tomcat 5.5
* Jetty 4.2.23
* Jetty 5.1.12
* Resin 3.0.12
* JBoss 4.0.1RC2
* JBoss 3.2.7
* JOnAS 4.3.3
* SunOne 6.1
* Orion 2.x
(luntbuild also can runs in standalone mode:http://luntbuild.javaforge.com/manual/guide/manual.html#standalone )
I choose Tomcat5.5, you can specify the web app location or you can deploy the war later;
then start the tomcat, and you can see:
Luntbuild : –> context initialization started
Luntbuild : –> context initialization finished
Luntbuild started now;
For more info about installation: http://luntbuild.javaforge.com/manual/guide/manual.html#installation
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.