parent
0cb742d63d
commit
85179937cc
28 changed files with 416 additions and 392 deletions
@ -1,220 +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-example', '示例执行器', '1', '0', null); |
||||
|
||||
commit; |
||||
|
||||
|
||||
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; |
||||
|
@ -0,0 +1,18 @@ |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
||||
<modelVersion>4.0.0</modelVersion> |
||||
<parent> |
||||
<groupId>com.xuxueli</groupId> |
||||
<artifactId>xxl-job</artifactId> |
||||
<version>1.8.2-SNAPSHOT</version> |
||||
</parent> |
||||
<artifactId>xxl-job-executor-samples</artifactId> |
||||
<packaging>pom</packaging> |
||||
|
||||
<modules> |
||||
<module>xxl-job-executor-sample-spring</module> |
||||
<module>xxl-job-executor-sample-springboot</module> |
||||
</modules> |
||||
|
||||
</project> |
@ -1,39 +1,39 @@ |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<parent> |
||||
<groupId>com.xuxueli</groupId> |
||||
<artifactId>xxl-job</artifactId> |
||||
<version>1.8.2-SNAPSHOT</version> |
||||
</parent> |
||||
<artifactId>xxl-job-executor-example</artifactId> |
||||
<packaging>war</packaging> |
||||
|
||||
<name>${project.artifactId}</name> |
||||
<description>Executor project for spring boot.</description> |
||||
<url>http://www.xuxueli.com/</url> |
||||
|
||||
<dependencies> |
||||
<!-- spring-webmvc --> |
||||
<dependency> |
||||
<groupId>org.springframework</groupId> |
||||
<artifactId>spring-webmvc</artifactId> |
||||
<version>${spring.version}</version> |
||||
</dependency> |
||||
|
||||
<!-- slf4j --> |
||||
<dependency> |
||||
<groupId>org.slf4j</groupId> |
||||
<artifactId>slf4j-log4j12</artifactId> |
||||
<version>${slf4j-api.version}</version> |
||||
</dependency> |
||||
|
||||
<!-- xxl-job-core --> |
||||
<dependency> |
||||
<groupId>com.xuxueli</groupId> |
||||
<artifactId>xxl-job-core</artifactId> |
||||
<version>${project.parent.version}</version> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<parent> |
||||
<groupId>com.xuxueli</groupId> |
||||
<artifactId>xxl-job-executor-samples</artifactId> |
||||
<version>1.8.2-SNAPSHOT</version> |
||||
</parent> |
||||
<artifactId>xxl-job-executor-sample-spring</artifactId> |
||||
<packaging>war</packaging> |
||||
|
||||
<name>${project.artifactId}</name> |
||||
<description>Executor project for spring boot.</description> |
||||
<url>http://www.xuxueli.com/</url> |
||||
|
||||
<dependencies> |
||||
<!-- spring-webmvc --> |
||||
<dependency> |
||||
<groupId>org.springframework</groupId> |
||||
<artifactId>spring-webmvc</artifactId> |
||||
<version>${spring.version}</version> |
||||
</dependency> |
||||
|
||||
<!-- slf4j --> |
||||
<dependency> |
||||
<groupId>org.slf4j</groupId> |
||||
<artifactId>slf4j-log4j12</artifactId> |
||||
<version>${slf4j-api.version}</version> |
||||
</dependency> |
||||
|
||||
<!-- xxl-job-core --> |
||||
<dependency> |
||||
<groupId>com.xuxueli</groupId> |
||||
<artifactId>xxl-job-core</artifactId> |
||||
<version>${project.parent.version}</version> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
</project> |
@ -1,38 +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<String> 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; |
||||
} |
||||
|
||||
} |
||||
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<String> 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; |
||||
} |
||||
|
||||
} |
@ -1,41 +1,41 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<beans xmlns="http://www.springframework.org/schema/beans" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xmlns:context="http://www.springframework.org/schema/context" |
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans |
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd |
||||
http://www.springframework.org/schema/context |
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> |
||||
|
||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
||||
<property name="fileEncoding" value="utf-8" /> |
||||
<property name="locations"> |
||||
<list> |
||||
<value>classpath*:xxl-job-executor.properties</value> |
||||
</list> |
||||
</property> |
||||
</bean> |
||||
|
||||
<!-- ********************************* 基础配置 ********************************* --> |
||||
|
||||
<!-- 配置01、JobHandler 扫描路径 --> |
||||
<context:component-scan base-package="com.xxl.job.executor.service.jobhandler" /> |
||||
|
||||
<!-- 配置02、执行器 --> |
||||
<bean id="xxlJobExecutor" class="com.xxl.job.core.executor.XxlJobExecutor" init-method="start" destroy-method="destroy" > |
||||
<!-- 执行器IP[选填],为空则自动获取 --> |
||||
<property name="ip" value="${xxl.job.executor.ip}" /> |
||||
<!-- 执行器端口号[必须] --> |
||||
<property name="port" value="${xxl.job.executor.port}" /> |
||||
<!-- 执行器AppName[选填],为空则关闭自动注册 --> |
||||
<property name="appName" value="${xxl.job.executor.appname}" /> |
||||
<!-- 执行器注册中心地址[选填],为空则关闭自动注册 --> |
||||
<property name="adminAddresses" value="${xxl.job.admin.addresses}" /> |
||||
<!-- 执行器日志路径[必填] --> |
||||
<property name="logPath" value="${xxl.job.executor.logpath}" /> |
||||
<!-- 访问令牌,非空则进行匹配校验[选填] --> |
||||
<property name="accessToken" value="${xxl.job.accessToken}" /> |
||||
</bean> |
||||
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<beans xmlns="http://www.springframework.org/schema/beans" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xmlns:context="http://www.springframework.org/schema/context" |
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans |
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd |
||||
http://www.springframework.org/schema/context |
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> |
||||
|
||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
||||
<property name="fileEncoding" value="utf-8" /> |
||||
<property name="locations"> |
||||
<list> |
||||
<value>classpath*:xxl-job-executor.properties</value> |
||||
</list> |
||||
</property> |
||||
</bean> |
||||
|
||||
<!-- ********************************* 基础配置 ********************************* --> |
||||
|
||||
<!-- 配置01、JobHandler 扫描路径 --> |
||||
<context:component-scan base-package="com.xxl.job.executor.service.jobhandler" /> |
||||
|
||||
<!-- 配置02、执行器 --> |
||||
<bean id="xxlJobExecutor" class="com.xxl.job.core.executor.XxlJobExecutor" init-method="start" destroy-method="destroy" > |
||||
<!-- 执行器IP[选填],为空则自动获取 --> |
||||
<property name="ip" value="${xxl.job.executor.ip}" /> |
||||
<!-- 执行器端口号[必须] --> |
||||
<property name="port" value="${xxl.job.executor.port}" /> |
||||
<!-- 执行器AppName[选填],为空则关闭自动注册 --> |
||||
<property name="appName" value="${xxl.job.executor.appname}" /> |
||||
<!-- 执行器注册中心地址[选填],为空则关闭自动注册 --> |
||||
<property name="adminAddresses" value="${xxl.job.admin.addresses}" /> |
||||
<!-- 执行器日志路径[必填] --> |
||||
<property name="logPath" value="${xxl.job.executor.logpath}" /> |
||||
<!-- 访问令牌,非空则进行匹配校验[选填] --> |
||||
<property name="accessToken" value="${xxl.job.accessToken}" /> |
||||
</bean> |
||||
|
||||
|
||||
</beans> |
@ -1,27 +1,27 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee" |
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" |
||||
id="WebApp_ID" version="2.5"> |
||||
<context-param> |
||||
<param-name>webAppRootKey</param-name> |
||||
<param-value>xxl-job-client-demo</param-value> |
||||
</context-param> |
||||
|
||||
<context-param> |
||||
<param-name>contextConfigLocation</param-name> |
||||
<param-value>classpath*:applicationcontext-*.xml</param-value> |
||||
</context-param> |
||||
|
||||
<listener> |
||||
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> |
||||
</listener> |
||||
<listener> |
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> |
||||
</listener> |
||||
|
||||
<welcome-file-list> |
||||
<welcome-file>index.html</welcome-file> |
||||
</welcome-file-list> |
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee" |
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" |
||||
id="WebApp_ID" version="2.5"> |
||||
<context-param> |
||||
<param-name>webAppRootKey</param-name> |
||||
<param-value>xxl-job-executor-sample-spring</param-value> |
||||
</context-param> |
||||
|
||||
<context-param> |
||||
<param-name>contextConfigLocation</param-name> |
||||
<param-value>classpath*:applicationcontext-*.xml</param-value> |
||||
</context-param> |
||||
|
||||
<listener> |
||||
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> |
||||
</listener> |
||||
<listener> |
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> |
||||
</listener> |
||||
|
||||
<welcome-file-list> |
||||
<welcome-file>index.html</welcome-file> |
||||
</welcome-file-list> |
||||
|
||||
</web-app> |
Loading…
Reference in new issue