diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
new file mode 100644
index 0000000..ab71b92
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
@@ -0,0 +1,13 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
new file mode 100644
index 0000000..ab71b92
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
@@ -0,0 +1,13 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..7091fff
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,27 @@
+
+
+
+ webAppRootKey
+ xxl-job-executor-sample-spring
+
+
+
+ contextConfigLocation
+ classpath*:applicationcontext-*.xml
+
+
+
+ org.springframework.web.util.Log4jConfigListener
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+ index.html
+
+
+
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
new file mode 100644
index 0000000..ab71b92
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
@@ -0,0 +1,13 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..7091fff
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,27 @@
+
+
+
+ webAppRootKey
+ xxl-job-executor-sample-spring
+
+
+
+ contextConfigLocation
+ classpath*:applicationcontext-*.xml
+
+
+
+ org.springframework.web.util.Log4jConfigListener
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+ index.html
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
new file mode 100644
index 0000000..ae4ee13
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
new file mode 100644
index 0000000..ab71b92
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
@@ -0,0 +1,13 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..7091fff
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,27 @@
+
+
+
+ webAppRootKey
+ xxl-job-executor-sample-spring
+
+
+
+ contextConfigLocation
+ classpath*:applicationcontext-*.xml
+
+
+
+ org.springframework.web.util.Log4jConfigListener
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+ index.html
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
new file mode 100644
index 0000000..ae4ee13
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
new file mode 100644
index 0000000..6944380
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
@@ -0,0 +1,41 @@
+package com.xxl.executor.test;
+
+import com.xxl.job.core.biz.ExecutorBiz;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.biz.model.TriggerParam;
+import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
+import com.xxl.job.core.glue.GlueTypeEnum;
+import com.xxl.job.core.rpc.netcom.NetComClientProxy;
+
+/**
+ * executor-api client, test
+ *
+ * Created by xuxueli on 17/5/12.
+ */
+public class DemoJobHandlerTest {
+
+ public static void main(String[] args) throws Exception {
+
+ // param
+ String jobHandler = "demoJobHandler";
+ String params = "";
+
+ // trigger data
+ TriggerParam triggerParam = new TriggerParam();
+ triggerParam.setJobId(1);
+ triggerParam.setExecutorHandler(jobHandler);
+ triggerParam.setExecutorParams(params);
+ triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
+ triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
+ triggerParam.setGlueSource(null);
+ triggerParam.setGlueUpdatetime(System.currentTimeMillis());
+ triggerParam.setLogId(1);
+ triggerParam.setLogDateTim(System.currentTimeMillis());
+
+ // do remote trigger
+ String accessToken = null;
+ ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
+ ReturnT runResult = executorBiz.run(triggerParam);
+ }
+
+}
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
new file mode 100644
index 0000000..ab71b92
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
@@ -0,0 +1,13 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..7091fff
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,27 @@
+
+
+
+ webAppRootKey
+ xxl-job-executor-sample-spring
+
+
+
+ contextConfigLocation
+ classpath*:applicationcontext-*.xml
+
+
+
+ org.springframework.web.util.Log4jConfigListener
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+ index.html
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
new file mode 100644
index 0000000..ae4ee13
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
new file mode 100644
index 0000000..6944380
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
@@ -0,0 +1,41 @@
+package com.xxl.executor.test;
+
+import com.xxl.job.core.biz.ExecutorBiz;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.biz.model.TriggerParam;
+import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
+import com.xxl.job.core.glue.GlueTypeEnum;
+import com.xxl.job.core.rpc.netcom.NetComClientProxy;
+
+/**
+ * executor-api client, test
+ *
+ * Created by xuxueli on 17/5/12.
+ */
+public class DemoJobHandlerTest {
+
+ public static void main(String[] args) throws Exception {
+
+ // param
+ String jobHandler = "demoJobHandler";
+ String params = "";
+
+ // trigger data
+ TriggerParam triggerParam = new TriggerParam();
+ triggerParam.setJobId(1);
+ triggerParam.setExecutorHandler(jobHandler);
+ triggerParam.setExecutorParams(params);
+ triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
+ triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
+ triggerParam.setGlueSource(null);
+ triggerParam.setGlueUpdatetime(System.currentTimeMillis());
+ triggerParam.setLogId(1);
+ triggerParam.setLogDateTim(System.currentTimeMillis());
+
+ // do remote trigger
+ String accessToken = null;
+ ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
+ ReturnT runResult = executorBiz.run(triggerParam);
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
new file mode 100644
index 0000000..d4d8533
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
@@ -0,0 +1,99 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-springboot
+ jar
+
+ ${project.artifactId}
+ Example executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+ UTF-8
+ UTF-8
+ 1.7
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ ${spring-boot.version}
+ pom
+ import
+
+
+
+
+ org.eclipse.jetty
+ jetty-server
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-util
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-http
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-io
+ ${jetty-server.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ repackage
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
new file mode 100644
index 0000000..ab71b92
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
@@ -0,0 +1,13 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..7091fff
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,27 @@
+
+
+
+ webAppRootKey
+ xxl-job-executor-sample-spring
+
+
+
+ contextConfigLocation
+ classpath*:applicationcontext-*.xml
+
+
+
+ org.springframework.web.util.Log4jConfigListener
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+ index.html
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
new file mode 100644
index 0000000..ae4ee13
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
new file mode 100644
index 0000000..6944380
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
@@ -0,0 +1,41 @@
+package com.xxl.executor.test;
+
+import com.xxl.job.core.biz.ExecutorBiz;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.biz.model.TriggerParam;
+import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
+import com.xxl.job.core.glue.GlueTypeEnum;
+import com.xxl.job.core.rpc.netcom.NetComClientProxy;
+
+/**
+ * executor-api client, test
+ *
+ * Created by xuxueli on 17/5/12.
+ */
+public class DemoJobHandlerTest {
+
+ public static void main(String[] args) throws Exception {
+
+ // param
+ String jobHandler = "demoJobHandler";
+ String params = "";
+
+ // trigger data
+ TriggerParam triggerParam = new TriggerParam();
+ triggerParam.setJobId(1);
+ triggerParam.setExecutorHandler(jobHandler);
+ triggerParam.setExecutorParams(params);
+ triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
+ triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
+ triggerParam.setGlueSource(null);
+ triggerParam.setGlueUpdatetime(System.currentTimeMillis());
+ triggerParam.setLogId(1);
+ triggerParam.setLogDateTim(System.currentTimeMillis());
+
+ // do remote trigger
+ String accessToken = null;
+ ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
+ ReturnT runResult = executorBiz.run(triggerParam);
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
new file mode 100644
index 0000000..d4d8533
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
@@ -0,0 +1,99 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-springboot
+ jar
+
+ ${project.artifactId}
+ Example executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+ UTF-8
+ UTF-8
+ 1.7
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ ${spring-boot.version}
+ pom
+ import
+
+
+
+
+ org.eclipse.jetty
+ jetty-server
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-util
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-http
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-io
+ ${jetty-server.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ repackage
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
new file mode 100644
index 0000000..51a0e45
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
@@ -0,0 +1,13 @@
+package com.xxl.job.executor;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
+}
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
new file mode 100644
index 0000000..ab71b92
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
@@ -0,0 +1,13 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..7091fff
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,27 @@
+
+
+
+ webAppRootKey
+ xxl-job-executor-sample-spring
+
+
+
+ contextConfigLocation
+ classpath*:applicationcontext-*.xml
+
+
+
+ org.springframework.web.util.Log4jConfigListener
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+ index.html
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
new file mode 100644
index 0000000..ae4ee13
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
new file mode 100644
index 0000000..6944380
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
@@ -0,0 +1,41 @@
+package com.xxl.executor.test;
+
+import com.xxl.job.core.biz.ExecutorBiz;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.biz.model.TriggerParam;
+import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
+import com.xxl.job.core.glue.GlueTypeEnum;
+import com.xxl.job.core.rpc.netcom.NetComClientProxy;
+
+/**
+ * executor-api client, test
+ *
+ * Created by xuxueli on 17/5/12.
+ */
+public class DemoJobHandlerTest {
+
+ public static void main(String[] args) throws Exception {
+
+ // param
+ String jobHandler = "demoJobHandler";
+ String params = "";
+
+ // trigger data
+ TriggerParam triggerParam = new TriggerParam();
+ triggerParam.setJobId(1);
+ triggerParam.setExecutorHandler(jobHandler);
+ triggerParam.setExecutorParams(params);
+ triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
+ triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
+ triggerParam.setGlueSource(null);
+ triggerParam.setGlueUpdatetime(System.currentTimeMillis());
+ triggerParam.setLogId(1);
+ triggerParam.setLogDateTim(System.currentTimeMillis());
+
+ // do remote trigger
+ String accessToken = null;
+ ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
+ ReturnT runResult = executorBiz.run(triggerParam);
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
new file mode 100644
index 0000000..d4d8533
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
@@ -0,0 +1,99 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-springboot
+ jar
+
+ ${project.artifactId}
+ Example executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+ UTF-8
+ UTF-8
+ 1.7
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ ${spring-boot.version}
+ pom
+ import
+
+
+
+
+ org.eclipse.jetty
+ jetty-server
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-util
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-http
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-io
+ ${jetty-server.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ repackage
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
new file mode 100644
index 0000000..51a0e45
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
@@ -0,0 +1,13 @@
+package com.xxl.job.executor;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java
new file mode 100644
index 0000000..8f3345e
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java
@@ -0,0 +1,53 @@
+package com.xxl.job.executor.core.config;
+
+import com.xxl.job.core.executor.XxlJobExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * xxl-job config
+ *
+ * @author xuxueli 2017-04-28
+ */
+@Configuration
+@ComponentScan(basePackages = "com.xxl.job.executor.service.jobhandler")
+public class XxlJobConfig {
+ private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
+
+
+ @Value("${xxl.job.admin.addresses}")
+ private String addresses;
+
+ @Value("${xxl.job.executor.appname}")
+ private String appname;
+
+ @Value("${xxl.job.executor.ip}")
+ private String ip;
+
+ @Value("${xxl.job.executor.port}")
+ private int port;
+
+ @Value("${xxl.job.executor.logpath}")
+ private String logpath;
+
+ @Value("${xxl.job.accessToken}")
+ private String accessToken;
+
+ @Bean(initMethod = "start", destroyMethod = "destroy")
+ public XxlJobExecutor xxlJobExecutor() {
+ logger.error("------------ xxlJobExecutor -----------");
+ XxlJobExecutor xxlJobExecutor = new XxlJobExecutor();
+ xxlJobExecutor.setIp(ip);
+ xxlJobExecutor.setPort(port);
+ xxlJobExecutor.setAppName(appname);
+ xxlJobExecutor.setAdminAddresses(addresses);
+ xxlJobExecutor.setLogPath(logpath);
+ xxlJobExecutor.setAccessToken(accessToken);
+ return xxlJobExecutor;
+ }
+
+}
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
new file mode 100644
index 0000000..ab71b92
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
@@ -0,0 +1,13 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..7091fff
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,27 @@
+
+
+
+ webAppRootKey
+ xxl-job-executor-sample-spring
+
+
+
+ contextConfigLocation
+ classpath*:applicationcontext-*.xml
+
+
+
+ org.springframework.web.util.Log4jConfigListener
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+ index.html
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
new file mode 100644
index 0000000..ae4ee13
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
new file mode 100644
index 0000000..6944380
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
@@ -0,0 +1,41 @@
+package com.xxl.executor.test;
+
+import com.xxl.job.core.biz.ExecutorBiz;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.biz.model.TriggerParam;
+import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
+import com.xxl.job.core.glue.GlueTypeEnum;
+import com.xxl.job.core.rpc.netcom.NetComClientProxy;
+
+/**
+ * executor-api client, test
+ *
+ * Created by xuxueli on 17/5/12.
+ */
+public class DemoJobHandlerTest {
+
+ public static void main(String[] args) throws Exception {
+
+ // param
+ String jobHandler = "demoJobHandler";
+ String params = "";
+
+ // trigger data
+ TriggerParam triggerParam = new TriggerParam();
+ triggerParam.setJobId(1);
+ triggerParam.setExecutorHandler(jobHandler);
+ triggerParam.setExecutorParams(params);
+ triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
+ triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
+ triggerParam.setGlueSource(null);
+ triggerParam.setGlueUpdatetime(System.currentTimeMillis());
+ triggerParam.setLogId(1);
+ triggerParam.setLogDateTim(System.currentTimeMillis());
+
+ // do remote trigger
+ String accessToken = null;
+ ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
+ ReturnT runResult = executorBiz.run(triggerParam);
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
new file mode 100644
index 0000000..d4d8533
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
@@ -0,0 +1,99 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-springboot
+ jar
+
+ ${project.artifactId}
+ Example executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+ UTF-8
+ UTF-8
+ 1.7
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ ${spring-boot.version}
+ pom
+ import
+
+
+
+
+ org.eclipse.jetty
+ jetty-server
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-util
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-http
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-io
+ ${jetty-server.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ repackage
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
new file mode 100644
index 0000000..51a0e45
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
@@ -0,0 +1,13 @@
+package com.xxl.job.executor;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java
new file mode 100644
index 0000000..8f3345e
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java
@@ -0,0 +1,53 @@
+package com.xxl.job.executor.core.config;
+
+import com.xxl.job.core.executor.XxlJobExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * xxl-job config
+ *
+ * @author xuxueli 2017-04-28
+ */
+@Configuration
+@ComponentScan(basePackages = "com.xxl.job.executor.service.jobhandler")
+public class XxlJobConfig {
+ private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
+
+
+ @Value("${xxl.job.admin.addresses}")
+ private String addresses;
+
+ @Value("${xxl.job.executor.appname}")
+ private String appname;
+
+ @Value("${xxl.job.executor.ip}")
+ private String ip;
+
+ @Value("${xxl.job.executor.port}")
+ private int port;
+
+ @Value("${xxl.job.executor.logpath}")
+ private String logpath;
+
+ @Value("${xxl.job.accessToken}")
+ private String accessToken;
+
+ @Bean(initMethod = "start", destroyMethod = "destroy")
+ public XxlJobExecutor xxlJobExecutor() {
+ logger.error("------------ xxlJobExecutor -----------");
+ XxlJobExecutor xxlJobExecutor = new XxlJobExecutor();
+ xxlJobExecutor.setIp(ip);
+ xxlJobExecutor.setPort(port);
+ xxlJobExecutor.setAppName(appname);
+ xxlJobExecutor.setAdminAddresses(addresses);
+ xxlJobExecutor.setLogPath(logpath);
+ xxlJobExecutor.setAccessToken(accessToken);
+ return xxlJobExecutor;
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java
new file mode 100644
index 0000000..1851d54
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java
@@ -0,0 +1,18 @@
+package com.xxl.job.executor.mvc.controller;
+
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+@Controller
+@EnableAutoConfiguration
+public class IndexController {
+
+ @RequestMapping("/")
+ @ResponseBody
+ String index() {
+ return "xxl job executor running.";
+ }
+
+}
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
new file mode 100644
index 0000000..ab71b92
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
@@ -0,0 +1,13 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..7091fff
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,27 @@
+
+
+
+ webAppRootKey
+ xxl-job-executor-sample-spring
+
+
+
+ contextConfigLocation
+ classpath*:applicationcontext-*.xml
+
+
+
+ org.springframework.web.util.Log4jConfigListener
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+ index.html
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
new file mode 100644
index 0000000..ae4ee13
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
new file mode 100644
index 0000000..6944380
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
@@ -0,0 +1,41 @@
+package com.xxl.executor.test;
+
+import com.xxl.job.core.biz.ExecutorBiz;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.biz.model.TriggerParam;
+import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
+import com.xxl.job.core.glue.GlueTypeEnum;
+import com.xxl.job.core.rpc.netcom.NetComClientProxy;
+
+/**
+ * executor-api client, test
+ *
+ * Created by xuxueli on 17/5/12.
+ */
+public class DemoJobHandlerTest {
+
+ public static void main(String[] args) throws Exception {
+
+ // param
+ String jobHandler = "demoJobHandler";
+ String params = "";
+
+ // trigger data
+ TriggerParam triggerParam = new TriggerParam();
+ triggerParam.setJobId(1);
+ triggerParam.setExecutorHandler(jobHandler);
+ triggerParam.setExecutorParams(params);
+ triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
+ triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
+ triggerParam.setGlueSource(null);
+ triggerParam.setGlueUpdatetime(System.currentTimeMillis());
+ triggerParam.setLogId(1);
+ triggerParam.setLogDateTim(System.currentTimeMillis());
+
+ // do remote trigger
+ String accessToken = null;
+ ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
+ ReturnT runResult = executorBiz.run(triggerParam);
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
new file mode 100644
index 0000000..d4d8533
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
@@ -0,0 +1,99 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-springboot
+ jar
+
+ ${project.artifactId}
+ Example executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+ UTF-8
+ UTF-8
+ 1.7
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ ${spring-boot.version}
+ pom
+ import
+
+
+
+
+ org.eclipse.jetty
+ jetty-server
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-util
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-http
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-io
+ ${jetty-server.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ repackage
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
new file mode 100644
index 0000000..51a0e45
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
@@ -0,0 +1,13 @@
+package com.xxl.job.executor;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java
new file mode 100644
index 0000000..8f3345e
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java
@@ -0,0 +1,53 @@
+package com.xxl.job.executor.core.config;
+
+import com.xxl.job.core.executor.XxlJobExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * xxl-job config
+ *
+ * @author xuxueli 2017-04-28
+ */
+@Configuration
+@ComponentScan(basePackages = "com.xxl.job.executor.service.jobhandler")
+public class XxlJobConfig {
+ private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
+
+
+ @Value("${xxl.job.admin.addresses}")
+ private String addresses;
+
+ @Value("${xxl.job.executor.appname}")
+ private String appname;
+
+ @Value("${xxl.job.executor.ip}")
+ private String ip;
+
+ @Value("${xxl.job.executor.port}")
+ private int port;
+
+ @Value("${xxl.job.executor.logpath}")
+ private String logpath;
+
+ @Value("${xxl.job.accessToken}")
+ private String accessToken;
+
+ @Bean(initMethod = "start", destroyMethod = "destroy")
+ public XxlJobExecutor xxlJobExecutor() {
+ logger.error("------------ xxlJobExecutor -----------");
+ XxlJobExecutor xxlJobExecutor = new XxlJobExecutor();
+ xxlJobExecutor.setIp(ip);
+ xxlJobExecutor.setPort(port);
+ xxlJobExecutor.setAppName(appname);
+ xxlJobExecutor.setAdminAddresses(addresses);
+ xxlJobExecutor.setLogPath(logpath);
+ xxlJobExecutor.setAccessToken(accessToken);
+ return xxlJobExecutor;
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java
new file mode 100644
index 0000000..1851d54
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java
@@ -0,0 +1,18 @@
+package com.xxl.job.executor.mvc.controller;
+
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+@Controller
+@EnableAutoConfiguration
+public class IndexController {
+
+ @RequestMapping("/")
+ @ResponseBody
+ String index() {
+ return "xxl job executor running.";
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..bf22239
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Service;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、继承 “IJobHandler” ;
+ * 2、装配到Spring,例如加 “@Service” 注解;
+ * 3、加 “@JobHander” 注解,注解value值为新增任务生成的JobKey的值;多个JobKey用逗号分割;
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Service
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
new file mode 100644
index 0000000..ab71b92
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
@@ -0,0 +1,13 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..7091fff
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,27 @@
+
+
+
+ webAppRootKey
+ xxl-job-executor-sample-spring
+
+
+
+ contextConfigLocation
+ classpath*:applicationcontext-*.xml
+
+
+
+ org.springframework.web.util.Log4jConfigListener
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+ index.html
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
new file mode 100644
index 0000000..ae4ee13
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
new file mode 100644
index 0000000..6944380
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
@@ -0,0 +1,41 @@
+package com.xxl.executor.test;
+
+import com.xxl.job.core.biz.ExecutorBiz;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.biz.model.TriggerParam;
+import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
+import com.xxl.job.core.glue.GlueTypeEnum;
+import com.xxl.job.core.rpc.netcom.NetComClientProxy;
+
+/**
+ * executor-api client, test
+ *
+ * Created by xuxueli on 17/5/12.
+ */
+public class DemoJobHandlerTest {
+
+ public static void main(String[] args) throws Exception {
+
+ // param
+ String jobHandler = "demoJobHandler";
+ String params = "";
+
+ // trigger data
+ TriggerParam triggerParam = new TriggerParam();
+ triggerParam.setJobId(1);
+ triggerParam.setExecutorHandler(jobHandler);
+ triggerParam.setExecutorParams(params);
+ triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
+ triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
+ triggerParam.setGlueSource(null);
+ triggerParam.setGlueUpdatetime(System.currentTimeMillis());
+ triggerParam.setLogId(1);
+ triggerParam.setLogDateTim(System.currentTimeMillis());
+
+ // do remote trigger
+ String accessToken = null;
+ ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
+ ReturnT runResult = executorBiz.run(triggerParam);
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
new file mode 100644
index 0000000..d4d8533
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
@@ -0,0 +1,99 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-springboot
+ jar
+
+ ${project.artifactId}
+ Example executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+ UTF-8
+ UTF-8
+ 1.7
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ ${spring-boot.version}
+ pom
+ import
+
+
+
+
+ org.eclipse.jetty
+ jetty-server
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-util
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-http
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-io
+ ${jetty-server.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ repackage
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
new file mode 100644
index 0000000..51a0e45
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
@@ -0,0 +1,13 @@
+package com.xxl.job.executor;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java
new file mode 100644
index 0000000..8f3345e
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java
@@ -0,0 +1,53 @@
+package com.xxl.job.executor.core.config;
+
+import com.xxl.job.core.executor.XxlJobExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * xxl-job config
+ *
+ * @author xuxueli 2017-04-28
+ */
+@Configuration
+@ComponentScan(basePackages = "com.xxl.job.executor.service.jobhandler")
+public class XxlJobConfig {
+ private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
+
+
+ @Value("${xxl.job.admin.addresses}")
+ private String addresses;
+
+ @Value("${xxl.job.executor.appname}")
+ private String appname;
+
+ @Value("${xxl.job.executor.ip}")
+ private String ip;
+
+ @Value("${xxl.job.executor.port}")
+ private int port;
+
+ @Value("${xxl.job.executor.logpath}")
+ private String logpath;
+
+ @Value("${xxl.job.accessToken}")
+ private String accessToken;
+
+ @Bean(initMethod = "start", destroyMethod = "destroy")
+ public XxlJobExecutor xxlJobExecutor() {
+ logger.error("------------ xxlJobExecutor -----------");
+ XxlJobExecutor xxlJobExecutor = new XxlJobExecutor();
+ xxlJobExecutor.setIp(ip);
+ xxlJobExecutor.setPort(port);
+ xxlJobExecutor.setAppName(appname);
+ xxlJobExecutor.setAdminAddresses(addresses);
+ xxlJobExecutor.setLogPath(logpath);
+ xxlJobExecutor.setAccessToken(accessToken);
+ return xxlJobExecutor;
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java
new file mode 100644
index 0000000..1851d54
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java
@@ -0,0 +1,18 @@
+package com.xxl.job.executor.mvc.controller;
+
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+@Controller
+@EnableAutoConfiguration
+public class IndexController {
+
+ @RequestMapping("/")
+ @ResponseBody
+ String index() {
+ return "xxl job executor running.";
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..bf22239
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Service;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、继承 “IJobHandler” ;
+ * 2、装配到Spring,例如加 “@Service” 注解;
+ * 3、加 “@JobHander” 注解,注解value值为新增任务生成的JobKey的值;多个JobKey用逗号分割;
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Service
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..c8b1560
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
- org.springframework
- spring-webmvc
- ${spring.version}
-
-
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j-api.version}
-
-
-
-
- com.xuxueli
- xxl-job-core
- ${project.parent.version}
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
deleted file mode 100644
index f9a2f60..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.stereotype.Component;
-
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * 任务Handler的一个Demo(Bean模式)
- *
- * 开发步骤:
- * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- * @author xuxueli 2015-12-19 19:43:36
- */
-@JobHander(value="demoJobHandler")
-@Component
-public class DemoJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
- XxlJobLogger.log("XXL-JOB, Hello World.");
-
- for (int i = 0; i < 5; i++) {
- XxlJobLogger.log("beat at:" + i);
- TimeUnit.SECONDS.sleep(2);
- }
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
deleted file mode 100644
index 6656035..0000000
--- a/xxl-job-executor-example/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xxl.job.executor.service.jobhandler;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.IJobHandler;
-import com.xxl.job.core.handler.annotation.JobHander;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 分片广播任务
- *
- * @author xuxueli 2017-07-25 20:56:50
- */
-@JobHander(value="shardingJobHandler")
-@Service
-public class ShardingJobHandler extends IJobHandler {
-
- @Override
- public ReturnT execute(String... params) throws Exception {
-
- // 分片参数
- ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
- XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
-
- // 业务逻辑
- for (int i = 0; i < shardingVO.getTotal(); i++) {
- if (i == shardingVO.getIndex()) {
- XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
- } else {
- XxlJobLogger.log("第 {0} 片, 忽略", i);
- }
- }
-
- return ReturnT.SUCCESS;
- }
-
-}
diff --git a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
deleted file mode 100644
index be84182..0000000
--- a/xxl-job-executor-example/src/main/resources/applicationcontext-xxl-job.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- classpath*:xxl-job-executor.properties
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/log4j.xml b/xxl-job-executor-example/src/main/resources/log4j.xml
deleted file mode 100644
index cd593b8..0000000
--- a/xxl-job-executor-example/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
deleted file mode 100644
index 7aa2da1..0000000
--- a/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
-
-### xxl-job executor address
-xxl.job.executor.appname=xxl-job-executor-example
-xxl.job.executor.ip=
-xxl.job.executor.port=9999
-
-### xxl-job log path
-xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
-
-### xxl-job, access token
-xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e4bb36b..0000000
--- a/xxl-job-executor-example/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- webAppRootKey
- xxl-job-client-demo
-
-
-
- contextConfigLocation
- classpath*:applicationcontext-*.xml
-
-
-
- org.springframework.web.util.Log4jConfigListener
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/main/webapp/index.html b/xxl-job-executor-example/src/main/webapp/index.html
deleted file mode 100644
index ae4ee13..0000000
--- a/xxl-job-executor-example/src/main/webapp/index.html
+++ /dev/null
@@ -1 +0,0 @@
-200
\ No newline at end of file
diff --git a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
deleted file mode 100644
index 6944380..0000000
--- a/xxl-job-executor-example/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.xxl.executor.test;
-
-import com.xxl.job.core.biz.ExecutorBiz;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.biz.model.TriggerParam;
-import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
-import com.xxl.job.core.glue.GlueTypeEnum;
-import com.xxl.job.core.rpc.netcom.NetComClientProxy;
-
-/**
- * executor-api client, test
- *
- * Created by xuxueli on 17/5/12.
- */
-public class DemoJobHandlerTest {
-
- public static void main(String[] args) throws Exception {
-
- // param
- String jobHandler = "demoJobHandler";
- String params = "";
-
- // trigger data
- TriggerParam triggerParam = new TriggerParam();
- triggerParam.setJobId(1);
- triggerParam.setExecutorHandler(jobHandler);
- triggerParam.setExecutorParams(params);
- triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
- triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
- triggerParam.setGlueSource(null);
- triggerParam.setGlueUpdatetime(System.currentTimeMillis());
- triggerParam.setLogId(1);
- triggerParam.setLogDateTim(System.currentTimeMillis());
-
- // do remote trigger
- String accessToken = null;
- ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
- ReturnT runResult = executorBiz.run(triggerParam);
- }
-
-}
diff --git a/xxl-job-executor-samples/pom.xml b/xxl-job-executor-samples/pom.xml
new file mode 100644
index 0000000..2f5386c
--- /dev/null
+++ b/xxl-job-executor-samples/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-samples
+ pom
+
+
+ xxl-job-executor-sample-spring
+ xxl-job-executor-sample-springboot
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
new file mode 100644
index 0000000..c7ef26f
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/pom.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-spring
+ war
+
+ ${project.artifactId}
+ Executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-api.version}
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..905a0b7
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
+ * 2、该类被Spring容器扫描为Bean实例,如加“@Component”注解;
+ * 3、添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Component
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..6656035
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
new file mode 100644
index 0000000..9a96a4d
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/applicationcontext-xxl-job.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ classpath*:xxl-job-executor.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
new file mode 100644
index 0000000..f0a7fc6
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/log4j.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
new file mode 100644
index 0000000..ab71b92
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
@@ -0,0 +1,13 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..7091fff
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,27 @@
+
+
+
+ webAppRootKey
+ xxl-job-executor-sample-spring
+
+
+
+ contextConfigLocation
+ classpath*:applicationcontext-*.xml
+
+
+
+ org.springframework.web.util.Log4jConfigListener
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+ index.html
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
new file mode 100644
index 0000000..ae4ee13
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/webapp/index.html
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
new file mode 100644
index 0000000..6944380
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/test/java/com/xxl/executor/test/DemoJobHandlerTest.java
@@ -0,0 +1,41 @@
+package com.xxl.executor.test;
+
+import com.xxl.job.core.biz.ExecutorBiz;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.biz.model.TriggerParam;
+import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
+import com.xxl.job.core.glue.GlueTypeEnum;
+import com.xxl.job.core.rpc.netcom.NetComClientProxy;
+
+/**
+ * executor-api client, test
+ *
+ * Created by xuxueli on 17/5/12.
+ */
+public class DemoJobHandlerTest {
+
+ public static void main(String[] args) throws Exception {
+
+ // param
+ String jobHandler = "demoJobHandler";
+ String params = "";
+
+ // trigger data
+ TriggerParam triggerParam = new TriggerParam();
+ triggerParam.setJobId(1);
+ triggerParam.setExecutorHandler(jobHandler);
+ triggerParam.setExecutorParams(params);
+ triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
+ triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
+ triggerParam.setGlueSource(null);
+ triggerParam.setGlueUpdatetime(System.currentTimeMillis());
+ triggerParam.setLogId(1);
+ triggerParam.setLogDateTim(System.currentTimeMillis());
+
+ // do remote trigger
+ String accessToken = null;
+ ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999", null).getObject();
+ ReturnT runResult = executorBiz.run(triggerParam);
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
new file mode 100644
index 0000000..d4d8533
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
@@ -0,0 +1,99 @@
+
+
+ 4.0.0
+
+ com.xuxueli
+ xxl-job-executor-samples
+ 1.8.2-SNAPSHOT
+
+ xxl-job-executor-sample-springboot
+ jar
+
+ ${project.artifactId}
+ Example executor project for spring boot.
+ http://www.xuxueli.com/
+
+
+ UTF-8
+ UTF-8
+ 1.7
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ ${spring-boot.version}
+ pom
+ import
+
+
+
+
+ org.eclipse.jetty
+ jetty-server
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-util
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-http
+ ${jetty-server.version}
+
+
+ org.eclipse.jetty
+ jetty-io
+ ${jetty-server.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ com.xuxueli
+ xxl-job-core
+ ${project.parent.version}
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ repackage
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
new file mode 100644
index 0000000..51a0e45
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/Application.java
@@ -0,0 +1,13 @@
+package com.xxl.job.executor;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java
new file mode 100644
index 0000000..8f3345e
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/core/config/XxlJobConfig.java
@@ -0,0 +1,53 @@
+package com.xxl.job.executor.core.config;
+
+import com.xxl.job.core.executor.XxlJobExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * xxl-job config
+ *
+ * @author xuxueli 2017-04-28
+ */
+@Configuration
+@ComponentScan(basePackages = "com.xxl.job.executor.service.jobhandler")
+public class XxlJobConfig {
+ private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
+
+
+ @Value("${xxl.job.admin.addresses}")
+ private String addresses;
+
+ @Value("${xxl.job.executor.appname}")
+ private String appname;
+
+ @Value("${xxl.job.executor.ip}")
+ private String ip;
+
+ @Value("${xxl.job.executor.port}")
+ private int port;
+
+ @Value("${xxl.job.executor.logpath}")
+ private String logpath;
+
+ @Value("${xxl.job.accessToken}")
+ private String accessToken;
+
+ @Bean(initMethod = "start", destroyMethod = "destroy")
+ public XxlJobExecutor xxlJobExecutor() {
+ logger.error("------------ xxlJobExecutor -----------");
+ XxlJobExecutor xxlJobExecutor = new XxlJobExecutor();
+ xxlJobExecutor.setIp(ip);
+ xxlJobExecutor.setPort(port);
+ xxlJobExecutor.setAppName(appname);
+ xxlJobExecutor.setAdminAddresses(addresses);
+ xxlJobExecutor.setLogPath(logpath);
+ xxlJobExecutor.setAccessToken(accessToken);
+ return xxlJobExecutor;
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java
new file mode 100644
index 0000000..1851d54
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/mvc/controller/IndexController.java
@@ -0,0 +1,18 @@
+package com.xxl.job.executor.mvc.controller;
+
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+@Controller
+@EnableAutoConfiguration
+public class IndexController {
+
+ @RequestMapping("/")
+ @ResponseBody
+ String index() {
+ return "xxl job executor running.";
+ }
+
+}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
new file mode 100644
index 0000000..bf22239
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/DemoJobHandler.java
@@ -0,0 +1,38 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.springframework.stereotype.Service;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * 任务Handler的一个Demo(Bean模式)
+ *
+ * 开发步骤:
+ * 1、继承 “IJobHandler” ;
+ * 2、装配到Spring,例如加 “@Service” 注解;
+ * 3、加 “@JobHander” 注解,注解value值为新增任务生成的JobKey的值;多个JobKey用逗号分割;
+ * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
+ *
+ * @author xuxueli 2015-12-19 19:43:36
+ */
+@JobHander(value="demoJobHandler")
+@Service
+public class DemoJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+ XxlJobLogger.log("XXL-JOB, Hello World.");
+
+ for (int i = 0; i < 5; i++) {
+ XxlJobLogger.log("beat at:" + i);
+ TimeUnit.SECONDS.sleep(2);
+ }
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
new file mode 100644
index 0000000..c8b1560
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/ShardingJobHandler.java
@@ -0,0 +1,39 @@
+package com.xxl.job.executor.service.jobhandler;
+
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.IJobHandler;
+import com.xxl.job.core.handler.annotation.JobHander;
+import com.xxl.job.core.log.XxlJobLogger;
+import com.xxl.job.core.util.ShardingUtil;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 分片广播任务
+ *
+ * @author xuxueli 2017-07-25 20:56:50
+ */
+@JobHander(value="shardingJobHandler")
+@Service
+public class ShardingJobHandler extends IJobHandler {
+
+ @Override
+ public ReturnT execute(String... params) throws Exception {
+
+ // 分片参数
+ ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
+ XxlJobLogger.log("分片参数:当前分片序号 = {0}, 总分片数 = {1}", shardingVO.getIndex(), shardingVO.getTotal());
+
+ // 业务逻辑
+ for (int i = 0; i < shardingVO.getTotal(); i++) {
+ if (i == shardingVO.getIndex()) {
+ XxlJobLogger.log("第 {0} 片, 命中分片开始处理", i);
+ } else {
+ XxlJobLogger.log("第 {0} 片, 忽略", i);
+ }
+ }
+
+ return ReturnT.SUCCESS;
+ }
+
+}
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/resources/application.properties b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/resources/application.properties
new file mode 100644
index 0000000..497c429
--- /dev/null
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/resources/application.properties
@@ -0,0 +1,20 @@
+# web port
+server.port=8081
+
+# log config
+logging.config=classpath:logback.xml
+
+# xxl-job
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
+
+### xxl-job executor address
+xxl.job.executor.appname=xxl-job-executor-sample
+xxl.job.executor.ip=
+xxl.job.executor.port=9998
+
+### xxl-job log path
+xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler/
+
+### xxl-job, access token
+xxl.job.accessToken=
diff --git a/NOTICE b/NOTICE
index f87996a..0fa19a5 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Copyright 2015-2017/NOW xuxueli.
+Copyright (c) 2015-present, xuxueli.
Dependencies:
================================================================
diff --git a/README.md b/README.md
index c3d5c4f..804e80e 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
## Documentation
- [中文文档](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB官方文档.md)
-- [Englis Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-Englis-Documentation.md)
+- [English Documentation](https://github.com/xuxueli/xxl-job/blob/master/doc/XXL-JOB-English-Documentation.md)
## Features
diff --git "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
deleted file mode 100644
index ba85d2c..0000000
--- "a/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
-#
-# PLEASE consider using mysql with innodb tables to avoid locking issues
-#
-# In your Quartz properties file, you'll need to set
-# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-#
-
-DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
-DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
-DROP TABLE IF EXISTS QRTZ_LOCKS;
-DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_TRIGGERS;
-DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
-DROP TABLE IF EXISTS QRTZ_CALENDARS;
-
-
-CREATE TABLE QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-commit;
diff --git a/db/tables_xxl_job.sql b/db/tables_xxl_job.sql
deleted file mode 100644
index 585467c..0000000
--- a/db/tables_xxl_job.sql
+++ /dev/null
@@ -1,220 +0,0 @@
-
-CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- JOB_CLASS_NAME VARCHAR(250) NOT NULL,
- IS_DURABLE VARCHAR(1) NOT NULL,
- IS_NONCONCURRENT VARCHAR(1) NOT NULL,
- IS_UPDATE_DATA VARCHAR(1) NOT NULL,
- REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- JOB_NAME VARCHAR(200) NOT NULL,
- JOB_GROUP VARCHAR(200) NOT NULL,
- DESCRIPTION VARCHAR(250) NULL,
- NEXT_FIRE_TIME BIGINT(13) NULL,
- PREV_FIRE_TIME BIGINT(13) NULL,
- PRIORITY INTEGER NULL,
- TRIGGER_STATE VARCHAR(16) NOT NULL,
- TRIGGER_TYPE VARCHAR(8) NOT NULL,
- START_TIME BIGINT(13) NOT NULL,
- END_TIME BIGINT(13) NULL,
- CALENDAR_NAME VARCHAR(200) NULL,
- MISFIRE_INSTR SMALLINT(2) NULL,
- JOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
- REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- REPEAT_COUNT BIGINT(7) NOT NULL,
- REPEAT_INTERVAL BIGINT(12) NOT NULL,
- TIMES_TRIGGERED BIGINT(10) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- CRON_EXPRESSION VARCHAR(200) NOT NULL,
- TIME_ZONE_ID VARCHAR(80),
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- STR_PROP_1 VARCHAR(512) NULL,
- STR_PROP_2 VARCHAR(512) NULL,
- STR_PROP_3 VARCHAR(512) NULL,
- INT_PROP_1 INT NULL,
- INT_PROP_2 INT NULL,
- LONG_PROP_1 BIGINT NULL,
- LONG_PROP_2 BIGINT NULL,
- DEC_PROP_1 NUMERIC(13,4) NULL,
- DEC_PROP_2 NUMERIC(13,4) NULL,
- BOOL_PROP_1 VARCHAR(1) NULL,
- BOOL_PROP_2 VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- BLOB_DATA BLOB NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
- FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
- REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_CALENDARS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- CALENDAR_NAME VARCHAR(200) NOT NULL,
- CALENDAR BLOB NOT NULL,
- PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- ENTRY_ID VARCHAR(95) NOT NULL,
- TRIGGER_NAME VARCHAR(200) NOT NULL,
- TRIGGER_GROUP VARCHAR(200) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- FIRED_TIME BIGINT(13) NOT NULL,
- SCHED_TIME BIGINT(13) NOT NULL,
- PRIORITY INTEGER NOT NULL,
- STATE VARCHAR(16) NOT NULL,
- JOB_NAME VARCHAR(200) NULL,
- JOB_GROUP VARCHAR(200) NULL,
- IS_NONCONCURRENT VARCHAR(1) NULL,
- REQUESTS_RECOVERY VARCHAR(1) NULL,
- PRIMARY KEY (SCHED_NAME,ENTRY_ID)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- INSTANCE_NAME VARCHAR(200) NOT NULL,
- LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
- CHECKIN_INTERVAL BIGINT(13) NOT NULL,
- PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
-);
-
-CREATE TABLE XXL_JOB_QRTZ_LOCKS
- (
- SCHED_NAME VARCHAR(120) NOT NULL,
- LOCK_NAME VARCHAR(40) NOT NULL,
- PRIMARY KEY (SCHED_NAME,LOCK_NAME)
-);
-
-
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
- `job_desc` varchar(255) NOT NULL,
- `add_time` datetime DEFAULT NULL,
- `update_time` datetime DEFAULT NULL,
- `author` varchar(64) DEFAULT NULL COMMENT '作者',
- `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
- `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
- `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
- `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
- `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
- `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
- `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
- `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
- `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
- `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
- `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
- `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
- `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
- `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
- `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
- `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
- `glue_source` text COMMENT 'GLUE源代码',
- `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
- `add_time` timestamp NULL DEFAULT NULL,
- `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `registry_group` varchar(255) NOT NULL,
- `registry_key` varchar(255) NOT NULL,
- `registry_value` varchar(255) NOT NULL,
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
- `title` varchar(12) NOT NULL COMMENT '执行器名称',
- `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
- `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
- `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-example', '示例执行器', '1', '0', null);
-
-commit;
-
diff --git a/doc/XXL-JOB-Englis-Documentation.md b/doc/XXL-JOB-Englis-Documentation.md
deleted file mode 100644
index ed615d2..0000000
--- a/doc/XXL-JOB-Englis-Documentation.md
+++ /dev/null
@@ -1,127 +0,0 @@
-# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
-
-[](https://travis-ci.org/xuxueli/xxl-job)
-[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
-[](https://github.com/xuxueli/xxl-job/releases)
-[](http://www.gnu.org/licenses/gpl-3.0.html)
-[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-## 1. Brief introduction
-
-### 1.1 Overview
-XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
-### 1.2 Features
-- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
-- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
-- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
-- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
-- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
-- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
-- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
-- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
-- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
-- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
-- 11.Status monitoring: support real-time monitoring of the progress of the task;
-- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
-- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
-- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
-- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
-- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
-- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
-- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
-- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
-- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
-- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
-- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
-- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
-- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
-### 1.3 Development
-In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
-In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
-In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
-In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
-In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
-#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
-According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
-So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
-
- - 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、增长引擎(北京)信息技术有限公司
- - ……
-
-Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
-
-### 1.4 Download
-
-#### Source repository address (The latest code will be released in the two git warehouse in the same time)
-
-Source repository address | Release Download
---- | ---
-[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
-[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
-
-#### Center repository address (The latest Release version:1.8.1)
-```
-
-
- com.xuxueli
- xxl-job-core
- 1.8.1
-
-```
-
-#### Blog address
-
-- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
-- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
-
-#### Technical exchange group (technical exchange only)
-
-- Group 6:399758605
-- Group 5:138274130 (Group is full, please add group 6)
-- Group 4:464762661 (Group is full, please add group 6)
-- Group 3:242151780 (Group is full, please add group 6)
-- Group 2:438249535 (Group is full, please add group 6)
-- Group 1:367260654 (Group is full, please add group 6)
-
-### 1.5 Environment
-- JDK:1.7+
-- Servlet/JSP Spec:3.1/2.3
-- Tomcat:8.5.x/Jetty9.2.x
-- Spring-boot:1.5.x/Spring4.x
-- Mysql:5.6+
-- Maven:3+
\ No newline at end of file
diff --git a/doc/XXL-JOB-English-Documentation.md b/doc/XXL-JOB-English-Documentation.md
new file mode 100644
index 0000000..ed615d2
--- /dev/null
+++ b/doc/XXL-JOB-English-Documentation.md
@@ -0,0 +1,127 @@
+# 《A lightweight distributed task scheduling framework. "XXL-JOB"》
+
+[](https://travis-ci.org/xuxueli/xxl-job)
+[](https://maven-badges.herokuapp.com/maven-central/com.xuxueli/xxl-job/)
+[](https://github.com/xuxueli/xxl-job/releases)
+[](http://www.gnu.org/licenses/gpl-3.0.html)
+[](https://gitter.im/xuxueli/xxl-job?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+
+## 1. Brief introduction
+
+### 1.1 Overview
+XXL-JOB is a lightweight distributed task scheduling framework, the core design goal is to develop quickly, learning simple, lightweight, easy to expand. Is now open source and access to a number of companies online product line, download and use it now.
+### 1.2 Features
+- 1.Simple: support through the Web page on the task CRUD operation, simple operation, a minute to get started;
+- 2.Dynamic: support dynamic modification of task status, pause / resume tasks, and termination of running tasks,immediate effect;
+- 3.Dispatch center HA (center type): Dispatch with central design, "dispatch center" based on the cluster of Quartz implementation, can guarantee the scheduling - center HA;
+- 4.Executer HA (Distributed): Task Distributed Execution, Task " Executer " supports cluster deployment to ensure that tasks perform HA;
+- 5.Task Failover: Deploy the Excuter cluster,tasks will be smooth to switch excuter when the strategy of the router choose ‘failover’;
+- 6.Consistency: "Dispatch Center" through the DB lock to ensure the consistency of cluster distributed scheduling,one task excuted for once;
+- 7.Custom task parameters: support online configuration scheduling tasks into the parameters, immediate effect;
+- 8.Scheduling thread pool: scheduling system multi-threaded trigger scheduling operation, to ensure accurate scheduling, not blocked;
+- 9.Elastic expansion capacity: once the new executor machine on the line or off the assembly line, the next time scheduling will be re-assigned tasks;
+- 10.Mail alarm: the task fails to support e-mail alarm, support configuring multiple email addresses to send bulk alert messages;
+- 11.Status monitoring: support real-time monitoring of the progress of the task;
+- 12.Rolling execution log: support online view scheduling results, and support Rolling real-time view of the executer output of the complete implementation of the log;
+- 13.GLUE: provide Web IDE, support online development task logic code, dynamic release, real-time compiler effective, omit the deployment of the on-line process. Supports historical versions of 30 versions back;
+- 14.Data Encryption: The communication between the dispatching center and the executor is used for data encryption, Enhancing the security of dispatching information;
+- 15.Task Dependency: Support configuration subtask dependencies, When the parent task executed end and after the success of the implementation will take the initiative to trigger a second task execution, multiple sub tasks are separated by commas;
+- 16.Push the Maven central warehouse: The latest stable version will be sent to the Maven central warehouse to facilitate user access and use;
+- 17.Task registration: The executor automatically registers tasks periodically, and the dispatch center automatically finds the registered tasks and triggers execution. It also supports manual input of executor address;
+- 18.Router strategy: A rich routing strategy is provided when the executor cluster is deployed, these include: first, last, poll, random, consistent HASH, least frequently used, least recently used, failover, busy over, sharding broadcast,etc.;
+- 19.Report monitor: Support real-time view of running data, such as the number of tasks, the number of dispatch, the number of executors, etc .; and scheduling reports, such as scheduling date distribution, scheduling success map;
+- 20.Script task: Support the development and operation of script tasks in GLUE mode, including shell, Python and other types of script;
+- 21.Blocking handling strategy: The scheduling is too dense and the executor is too late to handle. The strategy includes: single machine serial (default), discarding the following scheduling, and Override the previous scheduling;
+- 22.Failure handling strategy:Handling strategy when scheduling fails, the strategy includes: failure alarm (default), failure retry;
+- 23.Sharding broadcast task: When an executor cluster is deployed, task routing strategy select "sharding broadcast", a task schedule will broadcast all the actuators in the cluster to perform it once, you can develop sharding tasks based on sharding parameters;
+- 24.Dynamic sharding: The sharding broadcast task is sharded by the executors to support the dynamic expansion of the executor cluster to dynamically increase the number of shardings and cooperate with the business handle; In the large amount of data operations can significantly improve the task processing capacity and speed.
+### 1.3 Development
+In 2015, I created the XXL-JOB project repository on github and submitted the first commit, followed by the system structure design, UI selection, interactive design ...
+In 2015 - November, XXL-JOB finally RELEASE the first big version of V1.0, then I will be released to OSCHINA, XXL-JOB OSCHINA won the popular recommendation of @红薯, the same period reached OSCHINA's " Popular move "ranked first and git.oschina open source software monthly heat ranked first, especially thanks for @红薯, thank you for the attention and support.
+In 2015 - December, I will XXL-JOB published to our internal knowledge base, and get internal colleagues recognized.
+In 2016 - 01 months, my company started XXL-JOB internal access and custom work, in this thank Yuan and Yin two colleagues contribution, but also to thank the internal other attention and support colleagues.
+In 2017-05-13, the link of "let the code run" in "[the 62nd source of open source China Genesis](https://www.oschina.net/event/2236961)" held in Shanghai,, I stepped on and made a speech about the XXL-JOB, five hundred spectators in the audience reacted enthusiastically ([pictorial review](https://www.oschina.net/question/2686220_2242120)).
+#### My company have access to XXL-JOB, internal alias "Ferrari" (Ferrari based on XXL-JOB V1.1 version customization, new access application recommended to upgrade the latest version).
+According to the latest statistics, from 2016-01-21 to 2017-07-07 period, the system has been scheduled about 600,000 times, outstanding performance. New access applications recommend the latest version, because after several major updates, the system's task model, UI interaction model and the underlying scheduling communication model has a greater optimization and upgrading, the core function more stable and efficient.
+So far, XXL-JOB has access to a number of companies online product line, access to scenes such as electronic commerce, O2O business and large data operations, as of 2016-07-19, XXL-JOB has access to the company But not limited to:
+
+ - 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、增长引擎(北京)信息技术有限公司
+ - ……
+
+Welcome everyone's attention and use, XXL-JOB will also embrace changes, sustainable development.
+
+### 1.4 Download
+
+#### Source repository address (The latest code will be released in the two git warehouse in the same time)
+
+Source repository address | Release Download
+--- | ---
+[https://github.com/xuxueli/xxl-job](https://github.com/xuxueli/xxl-job) | [Download](https://github.com/xuxueli/xxl-job/releases)
+[http://git.oschina.net/xuxueli0323/xxl-job](http://git.oschina.net/xuxueli0323/xxl-job) | [Download](http://git.oschina.net/xuxueli0323/xxl-job/releases)
+
+#### Center repository address (The latest Release version:1.8.1)
+```
+
+
+ com.xuxueli
+ xxl-job-core
+ 1.8.1
+
+```
+
+#### Blog address
+
+- [oschina address](http://my.oschina.net/xuxueli/blog/690978)
+- [cnblogs address](http://www.cnblogs.com/xuxueli/p/5021979.html)
+
+#### Technical exchange group (technical exchange only)
+
+- Group 6:399758605
+- Group 5:138274130 (Group is full, please add group 6)
+- Group 4:464762661 (Group is full, please add group 6)
+- Group 3:242151780 (Group is full, please add group 6)
+- Group 2:438249535 (Group is full, please add group 6)
+- Group 1:367260654 (Group is full, please add group 6)
+
+### 1.5 Environment
+- JDK:1.7+
+- Servlet/JSP Spec:3.1/2.3
+- Tomcat:8.5.x/Jetty9.2.x
+- Spring-boot:1.5.x/Spring4.x
+- Mysql:5.6+
+- Maven:3+
\ No newline at end of file
diff --git "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md" "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
index e4d6318..300ca95 100644
--- "a/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
+++ "b/doc/XXL-JOB\345\256\230\346\226\271\346\226\207\346\241\243.md"
@@ -122,11 +122,11 @@
#### 技术交流
- 腾讯QQ群(6):399758605
-- 腾讯QQ群(5):138274130 (群即将满,请加群6)
-- 腾讯QQ群(4):464762661 (群即将满,请加群6)
-- 腾讯QQ群(3):242151780 (群即将满,请加群6)
-- 腾讯QQ群(2):438249535 (群即将满,请加群6)
-- 腾讯QQ群(1):367260654 (群即将满,请加群6)
+- 腾讯QQ群(5):138274130
+- 腾讯QQ群(4):464762661
+- 腾讯QQ群(3):242151780
+- 腾讯QQ群(2):438249535
+- 腾讯QQ群(1):367260654
### 1.5 环境
- JDK:1.7+
@@ -144,7 +144,7 @@
"调度数据库初始化SQL脚本" 位置为:
- /xxl-job/db/tables_xxl_job.sql
+ /xxl-job/doc/db/tables_xxl_job.sql
调度中心支持集群部署,集群情况下各节点务必连接同一个mysql实例;
@@ -155,8 +155,9 @@
xxl-job-admin:调度中心
xxl-job-core:公共依赖
- xxl-job-executor-example:执行器Example(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
- xxl-job-executor-springboot-example:执行器Example,springboot版本
+ xxl-job-executor:执行器Example项目
+ :xxl-job-executor-sample-spring:执行器Example,Spring版本(可直接使用执行器Example,也可以将现有项目改造成执行器使用)
+ :xxl-job-executor-sample-springboot:执行器Example,Springboot版本
### 2.3 配置部署“调度中心”
@@ -209,7 +210,7 @@
### 2.4 配置部署“执行器项目”
- “执行器”项目:xxl-job-executor-example (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
+ “执行器”项目:xxl-job-executor-sample-spring (如新建执行器项目,可参考该Example执行器项目的配置步骤;)
作用:负责接收“调度中心”的调度并执行;
#### 步骤一:maven依赖
@@ -218,7 +219,7 @@
#### 步骤二:执行器配置
执行器配置配置文件地址:
- /xxl-job/xxl-job-executor-example/src/main/resources/xxl-job-executor.properties
+ /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-spring/src/main/resources/xxl-job-executor.properties
执行器配置配置内容说明:
@@ -226,7 +227,7 @@
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address:执行器"AppName"和地址信息配置:AppName执行器心跳注册分组依据;地址信息用于"调度中心请求并触发任务"和"执行器注册"。执行器默认端口为9999,执行器IP默认为空表示自动获取IP,多网卡时可手动设置指定IP。单机部署多个执行器时,注意要配置不同执行器端口;
- xxl.job.executor.appname=xxl-job-executor-example
+ xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
xxl.job.executor.port=9999
@@ -248,8 +249,8 @@
#### 步骤四:部署执行器项目:
如果已经正确进行上述配置,可将执行器项目编译打部署,系统提供两个执行器example项目,选择其中一个即可,各自的部署方式如下。
- xxl-job-executor-example:项目编译打包成WAR包,并部署到tomcat中。
- xxl-job-executor-springboot-example:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
+ xxl-job-executor-sample-spring:项目编译打包成WAR包,并部署到tomcat中。
+ xxl-job-executor-sample-springboot:项目编译打包成springboot类型的可执行JAR包,命令启动即可;
至此“执行器”项目已经部署结束。
@@ -326,7 +327,7 @@
- 失败处理策略;调度失败时的处理策略;
失败告警(默认):调度失败时,将会触发失败报警,如发送报警邮件;
失败重试:调度失败时,将会主动进行一次失败重试调度,重试调度后仍然失败将会触发一失败告警。注意当任务以failover方式路由时,每次失败重试将会触发新一轮路由。
- - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数抓换成数组传入;
+ - 执行参数:任务执行所需的参数,多个参数时用逗号分隔,任务执行时将会把多个参数转换成数组传入;
- 报警邮件:任务调度失败时邮件通知的邮箱地址,支持配置多邮箱地址,配置多个邮箱地址时用逗号分隔;
- 负责人:任务的负责人;
@@ -337,7 +338,7 @@
- 1、 新建一个继承com.xxl.job.core.handler.IJobHandler的Java类;
- 2、 该类被Spring容器扫描为Bean实例,如加“@Component”注解;
- 3、 添加 “@JobHander(value="自定义jobhandler名称")”注解,注解的value值为自定义的JobHandler名称,该名称对应的是调度中心新建任务的JobHandler属性的值。
- (可参考xxl-job-executor-example项目中的DemoJobHandler,见下图)
+ (可参考Example执行器中的DemoJobHandler,见下图)

@@ -495,7 +496,7 @@
- /db :“调度数据库”建表脚本
- /xxl-job-admin :调度中心,项目源码
- /xxl-job-core :公共Jar依赖
- - /xxl-job-executor-example :执行器,Demo项目源码(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
+ - /xxl-job-executor-samples :执行器,Example项目(大家可以在该项目上进行开发,也可以将现有项目改造生成执行器项目)
#### 5.2 “调度数据库”配置
XXL-JOB调度模块基于Quartz集群实现,其“调度数据库”是在Quartz的11张集群mysql表基础上扩展而成。
@@ -944,6 +945,10 @@
- 10、springboot版本执行器,升级至1.5.6.RELEASE版本;
- 11、统一maven依赖版本管理;
+#### 6.18 版本 V1.8.2 特性[Coding]
+- 1、解决执行器回调URL不支持配置HTTPS时问题;
+- 2、规范项目目录,方便扩展多执行器;
+
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
- 2、任务分片路由:分片采用一致性Hash算法计算出尽量稳定的分片顺序,即使注册机器存在波动也不会引起分批分片顺序大的波动;目前采用IP自然排序,可以满足需求,待定;
diff --git "a/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql" "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
new file mode 100644
index 0000000..ba85d2c
--- /dev/null
+++ "b/doc/db/tables_mysql\050\345\244\207\344\273\275,\350\257\267\345\277\275\347\225\245\051.sql"
@@ -0,0 +1,168 @@
+#
+# Quartz seems to work best with the driver mm.mysql-2.0.7-bin.jar
+#
+# PLEASE consider using mysql with innodb tables to avoid locking issues
+#
+# In your Quartz properties file, you'll need to set
+# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#
+
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
+DROP TABLE IF EXISTS QRTZ_LOCKS;
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
+
+
+CREATE TABLE QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+commit;
diff --git a/doc/db/tables_xxl_job.sql b/doc/db/tables_xxl_job.sql
new file mode 100644
index 0000000..3441f14
--- /dev/null
+++ b/doc/db/tables_xxl_job.sql
@@ -0,0 +1,220 @@
+
+CREATE TABLE XXL_JOB_QRTZ_JOB_DETAILS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+ IS_DURABLE VARCHAR(1) NOT NULL,
+ IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+ IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ JOB_NAME VARCHAR(200) NOT NULL,
+ JOB_GROUP VARCHAR(200) NOT NULL,
+ DESCRIPTION VARCHAR(250) NULL,
+ NEXT_FIRE_TIME BIGINT(13) NULL,
+ PREV_FIRE_TIME BIGINT(13) NULL,
+ PRIORITY INTEGER NULL,
+ TRIGGER_STATE VARCHAR(16) NOT NULL,
+ TRIGGER_TYPE VARCHAR(8) NOT NULL,
+ START_TIME BIGINT(13) NOT NULL,
+ END_TIME BIGINT(13) NULL,
+ CALENDAR_NAME VARCHAR(200) NULL,
+ MISFIRE_INSTR SMALLINT(2) NULL,
+ JOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+ REFERENCES XXL_JOB_QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPLE_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ REPEAT_COUNT BIGINT(7) NOT NULL,
+ REPEAT_INTERVAL BIGINT(12) NOT NULL,
+ TIMES_TRIGGERED BIGINT(10) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CRON_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ CRON_EXPRESSION VARCHAR(200) NOT NULL,
+ TIME_ZONE_ID VARCHAR(80),
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SIMPROP_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_BLOB_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ BLOB_DATA BLOB NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES XXL_JOB_QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_CALENDARS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ CALENDAR_NAME VARCHAR(200) NOT NULL,
+ CALENDAR BLOB NOT NULL,
+ PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_PAUSED_TRIGGER_GRPS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_FIRED_TRIGGERS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ ENTRY_ID VARCHAR(95) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ FIRED_TIME BIGINT(13) NOT NULL,
+ SCHED_TIME BIGINT(13) NOT NULL,
+ PRIORITY INTEGER NOT NULL,
+ STATE VARCHAR(16) NOT NULL,
+ JOB_NAME VARCHAR(200) NULL,
+ JOB_GROUP VARCHAR(200) NULL,
+ IS_NONCONCURRENT VARCHAR(1) NULL,
+ REQUESTS_RECOVERY VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_SCHEDULER_STATE
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ INSTANCE_NAME VARCHAR(200) NOT NULL,
+ LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+ CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+CREATE TABLE XXL_JOB_QRTZ_LOCKS
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ LOCK_NAME VARCHAR(40) NOT NULL,
+ PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_INFO` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_cron` varchar(128) NOT NULL COMMENT '任务执行CRON',
+ `job_desc` varchar(255) NOT NULL,
+ `add_time` datetime DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ `author` varchar(64) DEFAULT NULL COMMENT '作者',
+ `alarm_email` varchar(255) DEFAULT NULL COMMENT '报警邮件',
+ `executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '执行器路由策略',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT '执行器任务参数',
+ `executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞处理策略',
+ `executor_fail_strategy` varchar(50) DEFAULT NULL COMMENT '失败处理策略',
+ `glue_type` varchar(50) NOT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE备注',
+ `glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新时间',
+ `child_jobkey` varchar(255) DEFAULT NULL COMMENT '子任务Key',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOG` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `executor_address` varchar(255) DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
+ `executor_handler` varchar(255) DEFAULT NULL COMMENT '执行器任务handler',
+ `executor_param` varchar(255) DEFAULT NULL COMMENT 'executor_param',
+ `trigger_time` datetime DEFAULT NULL COMMENT '调度-时间',
+ `trigger_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '调度-结果',
+ `trigger_msg` varchar(2048) DEFAULT NULL COMMENT '调度-日志',
+ `handle_time` datetime DEFAULT NULL COMMENT '执行-时间',
+ `handle_code` varchar(255) NOT NULL DEFAULT '0' COMMENT '执行-状态',
+ `handle_msg` varchar(2048) DEFAULT NULL COMMENT '执行-日志',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_LOGGLUE` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
+ `glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE类型',
+ `glue_source` text COMMENT 'GLUE源代码',
+ `glue_remark` varchar(128) NOT NULL COMMENT 'GLUE备注',
+ `add_time` timestamp NULL DEFAULT NULL,
+ `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE XXL_JOB_QRTZ_TRIGGER_REGISTRY (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `registry_group` varchar(255) NOT NULL,
+ `registry_key` varchar(255) NOT NULL,
+ `registry_value` varchar(255) NOT NULL,
+ `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `XXL_JOB_QRTZ_TRIGGER_GROUP` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `app_name` varchar(64) NOT NULL COMMENT '执行器AppName',
+ `title` varchar(12) NOT NULL COMMENT '执行器名称',
+ `order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '排序',
+ `address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '执行器地址类型:0=自动注册、1=手动录入',
+ `address_list` varchar(200) DEFAULT NULL COMMENT '执行器地址列表,多地址逗号分隔',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `XXL_JOB_QRTZ_TRIGGER_GROUP` ( `app_name`, `title`, `order`, `address_type`, `address_list`) values ( 'xxl-job-executor-sample', '示例执行器', '1', '0', null);
+
+commit;
+
diff --git a/pom.xml b/pom.xml
index 2d4a3f6..3d6fd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,8 +13,7 @@
xxl-job-core
xxl-job-admin
- xxl-job-executor-example
- xxl-job-executor-springboot-example
+ xxl-job-executor-samples
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
index 1d5cb84..377d8b3 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
@@ -71,7 +71,9 @@
initAdminBizList(adminAddresses, accessToken);
// init executor-jobHandlerRepository
- initJobHandlerRepository(applicationContext);
+ if (applicationContext != null) {
+ initJobHandlerRepository(applicationContext);
+ }
// init logpath
if (logPath!=null && logPath.trim().length()>0) {
diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
index bd21025..27b942b 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
@@ -18,7 +18,7 @@
// for JobThread (support log for child thread of job handler)
//public static ThreadLocal contextHolder = new ThreadLocal();
public static final InheritableThreadLocal contextHolder = new InheritableThreadLocal();
- public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ public static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // TODO, concurrent issues
public static String logPath = "/data/applogs/xxl-job/jobhandler/";
/**
diff --git a/xxl-job-executor-example/pom.xml b/xxl-job-executor-example/pom.xml
deleted file mode 100644
index 536d31a..0000000
--- a/xxl-job-executor-example/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
- 4.0.0
-
- com.xuxueli
- xxl-job
- 1.8.2-SNAPSHOT
-
- xxl-job-executor-example
- war
-
- ${project.artifactId}
- Executor project for spring boot.
- http://www.xuxueli.com/
-
-
-
-
-