forked from quartz-scheduler/quartz-scheduler.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
345 lines (247 loc) · 13.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico">
<link rel="icon" type="image/x-icon" href="/images/favicon.ico">
<title>Quartz Enterprize Job Scheduler</title>
<meta name="description" content="A full-featured, Java-based, In-process job scheduler.">
<link rel="canonical" href="http://www.quartz-scheduler.org/">
<link rel="alternate" type="application/rss+xml" title="Quartz Enterprize Job Scheduler" href="http://www.quartz-scheduler.org/feed.xml" />
<!-- Fonts -->
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,300italic,400italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<!-- Global CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/spacelab/bootstrap.min.css">
<!--
<link rel="stylesheet" href="/plugins/highlight/styles/idea.css">
<script src="/plugins/highlight/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
-->
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/prettify.css"></script>
<link rel="stylesheet" href="/css/main.css">
<!--
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.js"></script>
<script>document.addEventListener('DOMContentLoaded', prettyPrint)</script>
-->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="site-title" href="/"><img src="/images/logo-quartz-scheduler.png"/></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li id="site_mnu_about"><a href="/overview/"><i class="fa fa-info-circle"></i> About</a></li>
<li id="site_mnu_docs"><a href="/documentation/"><i class="fa fa-book"></i> Docs</a></li>
<li id="site_mnu_download"><a href="/downloads/"><i class="fa fa-download"></i> Download</a></li>
<li id="site_mnu_community" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-users"></i> Community <span class="caret"></span></a>
<ul class="dropdown-menu">
<li class="dropdown-header">We Love Contributors</li>
<li><a href="/community/"><i class="fa fa-code"></i> Contributing</a></li>
<li role="separator" class="divider"></li>
<li class="dropdown-header">Forums</li>
<li><a href="https://groups.google.com/forum/#!forum/quartz-scheduler" target="_blank"><i class="fa fa-commenting"></i> Users' Forum</a></li>
<li><a href="https://groups.google.com/forum/#!forum/quartz-scheduler-dev" target="_blank"><i class="fa fa-commenting"></i> Developers' Forum</a></li>
<li role="separator" class="divider"></li>
<li class="dropdown-header">Source Code</li>
<li><a href="https://github.com/quartz-scheduler/quartz"><i class="fa fa-code-fork"></i> GitHub</a></li>
<li role="separator" class="divider"></li>
<li class="dropdown-header">Bug Tracking</li>
<li><a href="https://github.com/quartz-scheduler/quartz/issues"><i class="fa fa-bug"></i> GitHub</a></li>
<li><a href="http://jira.terracotta.org/jira/browse/QTZ"><i class="fa fa-bug"></i> Jira (historical)</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<!-- <li id="site_mnu_events"><a href="/events"><i class="fa fa-calendar"></i> News & Events</a></li> -->
<li><a href="http://blog.terracotta.org"><i class="fa fa-rss-square"></i> Blog</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<br/>
<br/>
<br/>
<div id="banner" class="jumbotron breaker">
<div class="container banner breaker">
<img src="/images/Quartz_Logo_large.jpg">
<h1>Job Scheduler</h1>
</div>
<div style="text-align: center; margin-top: 20px;">
<a href="/downloads/"><button type="button" class="btn btn-lg btn-success"><i class="fa fa-download"></i> Downloads</button></a>
<span> </span>
<a href="/documentation/"><button type="button" class="btn btn-lg btn-primary"><i class="fa fa-book"></i> Documentation</button></a>
<span> </span>
<a href="https://github.com/quartz-scheduler/quartz"><button type="button" class="btn btn-lg btn-default"><i class="fa fa-github"></i> GitHub Project</button></a>
</div>
</div>
<div id="intro" class="jumbotron breaker">
<div class="container">
<h2>What is the Quartz Job Scheduling Library?</h2>
<p>Quartz is a <a href="/overview/features.html">richly featured</a>, open source job scheduling library that can be integrated within virtually any Java 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 may execute virtually anything you may program them to do. The Quartz Scheduler includes many enterprise-class features, such as support for JTA transactions and clustering.</p>
<p>Quartz is freely usable, licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a>.</p>
<hr/>
<p>Please read our <a href="/overview">overview</a> for additional quick information.</p>
</div>
</div>
<div id="start" class="jumbotron breaker">
<div class="container">
<h1>Getting started with Quartz</h1>
<p>Quartz let's you add scheduling to your Java application with ease. Learning just a few concepts will get you started.</p>
<h2>Adding Quartz to Your Project</h2>
<p>Your project will need (at least) the Quartz core library, named quartz-x.y.z.jar (where x.y.z is a version number), in its classpath.</p>
<p>Quartz has few dependencies, but always requires at least the sl4j-api jar file. If you want to store your scheduling data in a database then you will also need the c3p0 library. If needed, these libraries can be found in the Quartz distribution.</p>
<p>You may also want the quartz-jobs jar file on your classpath - if you want to use any of the jobs "built into" quartz.</p>
<h3><a name="jars"></a>Downloading the Jars</h3>
<p>You can <a href="/downloads">download the full distribution</a> (with examples, source, dependencies, doc, etc.).</p>
<p>Or if you are a Maven user you can add the dependencies (only the first below is required):</p>
<pre class="prettyprint highlight"><code class="language-xml" data-lang="xml"> <dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz-jobs</artifactId>
<version>2.2.1</version>
</dependency> </code></pre>
<h2>Using Quartz</h2>
<h3>Instantiate and Start a Scheduler</h3>
<p>Schedulers are created by factories.</p>
<p>Schedulers can be immediately used to schedule jobs, but they will not start executing any until the <code>.start()</code> method has been called.</p>
<pre class="prettyprint highlight"><code class="language-java" data-lang="java">
// Grab the Scheduler instance from the Factory
Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();
// and start it off
scheduler.start();
</code></pre>
<h3>Coding with the Quartz Fluent Scheduling API</h3>
<p>The Quartz API is designed to be used as fluent domain-specific language (DSL). This can be done most cleanly if you import the API components statically:</p>
<pre class="prettyprint highlight"><code class="language-java" data-lang="java"> import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.impl.StdSchedulerFactory;
import static org.quartz.JobBuilder.*;
import static org.quartz.TriggerBuilder.*;
import static org.quartz.SimpleScheduleBuilder.*;
</code></pre>
<p>Once you have done that, you can implement Jobs - which have an <code>.execute(..)</code> method.</p>
<pre class="prettyprint highlight"><code class="language-java" data-lang="java">
public class MyJob implements org.quartz.Job {
public MyJob() {
}
public void execute(JobExecutionContext context) throws JobExecutionException {
System.err.println("Hello World! MyJob is executing.");
}
}
</code></pre>
<p>And then schedule those jobs with triggers that define at what time(s) the job should run.</p>
<pre class="prettyprint highlight"><code class="language-java" data-lang="java">
// define the job and tie it to our MyJob class
JobDetail job = newJob(MyJob.class)
.withIdentity("job1", "group1")
.build();
// Trigger the job to run now, and then repeat every 40 seconds
Trigger trigger = newTrigger()
.withIdentity("trigger1", "group1")
.startNow()
.withSchedule(simpleSchedule()
.withIntervalInSeconds(40)
.repeatForever())
.build();
// Tell quartz to schedule the job using our trigger
scheduler.scheduleJob(job, trigger);
</code></pre>
<h2>Ready to Learn More?</h2>
<p>Read the <a href="/documentation">user documentation</a> to learn more about Quartz concepts.</p>
</div>
<br/>
<footer class="site-footer">
<div class="container">
<div class="footer-col-wrapper">
<div class="footer-col footer-col-1">
Related Projects:<br/>
<a href="http://www.terracotta.org"><img src="/images/Terracotta_Logo_sm.png" style="max-height: 20px;"></a><br/>
<a href="http://www.ehcache.org"><img src="/images/ehcache.png" style="max-height: 44px;"></a>
<!--
<ul class="contact-list">
<li>Quartz Enterprize Job Scheduler</li>
<li><a href="mailto:[email protected]">[email protected]</a></li>
</ul>
-->
</div>
<div class="footer-col footer-col-2">
<ul class="social-media-list">
<li>
<a href="https://github.com/quartz-scheduler">
<i class="fa fa-github"></i> GitHub
</a>
</li>
<li>
<a href="https://twitter.com/terracottatech">
<i class="fa fa-twitter"></i> Twitter
</a>
</li>
<li>
<a href="http://www.facebook.com/Terracotta">
<i class="fa fa-facebook"></i> Facebook
</a>
</li>
<li>
<a href="http://www.linkedin.com/company/terracotta">
<i class="fa fa-linkedin"></i> LinkedIn
</a>
</li>
</ul>
</div>
<div class="footer-col footer-col-3">
<a href="/downloads/"><i class="fa fa-download"></i> Download Now</a>
<br/>
<a href="/documentation/"><i class="fa fa-book"></i> Documentation</a>
<br/>
<a href="/community/"><i class="fa fa-users"></i> Join the Community</a>
</div>
</div>
<div class="container-fluid">
<hr/>
<em class="copyleft">Quartz Job Scheduler is Open Source and freely available under the Apache 2 License</em>
<br/>
<em class="copyright">© Terracotta, Inc., a wholly-owned subsidiary of Software AG USA, Inc. All rights reserved.</em>
</div>
</div>
</footer>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="https://maxcdn.bootstrapcdn.com/js/ie10-viewport-bug-workaround.js"></script>
<!-- <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/2.1.0/jquery.scrollTo.min.js"/> -->
<script type="text/javascript">
$('#').addClass("active");
$('#').addClass("active");
</script>
</body>
</html>