|
@@ -124,4 +124,72 @@ Source repository address | Release Download
|
124
|
124
|
- Tomcat:8.5.x/Jetty9.2.x
|
125
|
125
|
- Spring-boot:1.5.x/Spring4.x
|
126
|
126
|
- Mysql:5.6+
|
127
|
|
-- Maven:3+
|
|
127
|
+- Maven:3+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+## 2. Quick Start
|
|
131
|
+
|
|
132
|
+### 2.1 Init database
|
|
133
|
+Please download project source code,get db scripts and execute, it will generate 16 tables if succeed.
|
|
134
|
+
|
|
135
|
+The relative path of db scripts is as follows:
|
|
136
|
+
|
|
137
|
+ /xxl-job/doc/db/tables_xxl_job.sql
|
|
138
|
+
|
|
139
|
+The xxl-job-admin can be deployed as a cluster,all nodes of the cluster must connect to the same mysql instance.
|
|
140
|
+
|
|
141
|
+If mysql instances is deployed in master-slave mode,all nodes of the cluster must connect to master instace.
|
|
142
|
+
|
|
143
|
+### 2.2 Compile
|
|
144
|
+Source code is organized by maven,unzip it and structure is as follows:
|
|
145
|
+
|
|
146
|
+ xxl-job-admin:schedule admin center
|
|
147
|
+ xxl-job-core:public common dependent library
|
|
148
|
+ xxl-job-executor:executor Sample(Select appropriate version of executor,Can be used directly,You can also refer to it and transform existing projects into executors)
|
|
149
|
+ :xxl-job-executor-sample-spring:Spring version,executors managed by Spring,general and recommend;
|
|
150
|
+ :xxl-job-executor-sample-springboot:Springboot version,executors managed by Springboot;
|
|
151
|
+ :xxl-job-executor-sample-jfinal:JFinal version,executors managed by JFinal;
|
|
152
|
+
|
|
153
|
+### 2.3 Configure and delploy "Schedule Center"
|
|
154
|
+
|
|
155
|
+ schedule center project:xxl-job-admin
|
|
156
|
+ target:Centralized management、Schedule and trigger task
|
|
157
|
+
|
|
158
|
+#### Step 1:Configure Schedule Center
|
|
159
|
+Configure file’s path of schedule center is as follows:
|
|
160
|
+
|
|
161
|
+ /xxl-job/xxl-job-admin/src/main/resources/xxl-job-admin.properties
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+The concrete contet describe as follows:
|
|
165
|
+
|
|
166
|
+ ### JDBC connection info of schedule center:keep Consistent with chapter 2.1
|
|
167
|
+ xxl.job.db.driverClass=com.mysql.jdbc.Driver
|
|
168
|
+ xxl.job.db.url=jdbc:mysql://localhost:3306/xxl-job?useUnicode=true&characterEncoding=UTF-8
|
|
169
|
+ xxl.job.db.user=root
|
|
170
|
+ xxl.job.db.password=root_pwd
|
|
171
|
+
|
|
172
|
+ ### Alarm mailbox
|
|
173
|
+ xxl.job.mail.host=smtp.163.com
|
|
174
|
+ xxl.job.mail.port=25
|
|
175
|
+ xxl.job.mail.username=ovono802302@163.com
|
|
176
|
+ xxl.job.mail.password=asdfzxcv
|
|
177
|
+ xxl.job.mail.sendFrom=ovono802302@163.com
|
|
178
|
+ xxl.job.mail.sendNick=《任务调度平台XXL-JOB》
|
|
179
|
+
|
|
180
|
+ ### Login account
|
|
181
|
+ xxl.job.login.username=admin
|
|
182
|
+ xxl.job.login.password=123456
|
|
183
|
+
|
|
184
|
+ ### TOKEN used for communication between the executor and schedule center, enabled if it’s not null
|
|
185
|
+ xxl.job.accessToken=
|
|
186
|
+
|
|
187
|
+#### Step 2:Deploy:
|
|
188
|
+If you has finished step 1,then you can compile the project in maven and deploy the war package to tomcat.
|
|
189
|
+the url to visit is :http://localhost:8080/xxl-job-admin (this address will be used by executor and use it as callback url),the index page after login in is as follow
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+Now,the “xxl-job-admin” project is deployed success.
|
|
194
|
+
|
|
195
|
+#### Step3:schedule center Cluster(Option):
|