| 1 |
<html> |
| 2 |
<head> |
| 3 |
<title>Package org.quartz</title> |
| 4 |
</head> |
| 5 |
<body> |
| 6 |
<p>The main package of <b>Quartz</b>, containing the client-side interfaces.</p> |
| 7 |
|
| 8 |
<br> |
| 9 |
<br> |
| 10 |
<hr> |
| 11 |
<p>See the <a href="http://www.quartz-scheduler.org">Quartz</a> project for more information.</p> |
| 12 |
|
| 13 |
|
| 14 |
<p>Quartz provides a builder-style API for constructing scheduling-related |
| 15 |
entities via a Domain-Specific Language (DSL). The DSL can best be |
| 16 |
utilized through the usage of static imports of the methods on the classes |
| 17 |
<code>TriggerBuilder</code>, <code>JobBuilder</code>, |
| 18 |
<code>DateBuilder</code>, <code>JobKey</code>, <code>TriggerKey</code> |
| 19 |
and the various <code>ScheduleBuilder</code> implementations.</p> |
| 20 |
|
| 21 |
<p>Client code can then use the DSL to write code such as this:</p> |
| 22 |
<pre> |
| 23 |
JobDetail job = newJob(MyJob.class) |
| 24 |
.withIdentity("myJob") |
| 25 |
.build(); |
| 26 |
|
| 27 |
Trigger trigger = newTrigger() |
| 28 |
.withIdentity(triggerKey("myTrigger", "myTriggerGroup")) |
| 29 |
.withSchedule(simpleSchedule() |
| 30 |
.withIntervalInHours(1) |
| 31 |
.repeatForever()) |
| 32 |
.startAt(futureDate(10, MINUTES)) |
| 33 |
.build(); |
| 34 |
|
| 35 |
scheduler.scheduleJob(job, trigger); |
| 36 |
</pre> |
| 37 |
|
| 38 |
</body> |
| 39 |
</html> |