quartz数据库说明

编程

6. qrtz_blob_triggers

这个不重要,一般不用

7. qrtz_calendars

字段

字段描述

SCHED_NAME

调度器名称和

CALENDAR_NAME

日历名称

CALENDAR

日历

8. qrtz_paused_trigger_grps

字段

字段描述

SCHED_NAME

触发器名称

TRIGGER_GROUP

触发器组

9. qrtz_fired_triggers

字段

字段描述

SCHED_NAME

调度器名称

ENTRY_ID

入口id

TRIGGER_NAME

触发器名称

TRIGGER_GROUP

触发器组

INSTANCE_NAME

实例名称

FIRED_TIME

触发时间

SCHED_TIME

调度时间

PRIORITY

优先级

STATE

状态

JOB_NAME

任务名称

JOB_GROUP

任务组

IS_NONCONCURRENT

是否不同步

REQUESTS_RECOVERY

是否可请求恢复

10. qrtz_scheduler_state

字段

字段描述

SCHED_NAME

触发器名称

INSTANCE_NAME

实例名称

LAST_CHECKIN_TIME

最后检查时间

CHECKIN_INTERVAL

检查间隔

11. qrtz_locks

字段

字段描述

SCHED_NAME

调度器名称

LOCK_NAME

锁名称

完整sql

#

# In your Quartz properties file, you"ll need to set

# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate

#

#

# By: Ron Cordell - roncordell

# I didn"t see this anywhere, so I thought I"d post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM.

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) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "调度器名称",

`JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "任务名称",

`JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "任务组名称",

`DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT "描述",

`JOB_CLASS_NAME` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "类路径",

`IS_DURABLE` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "是否持久化",

`IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "是否不同步",

`IS_UPDATE_DATA` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "是否更新数据",

`REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "是否要求可恢复",

`JOB_DATA` blob COMMENT "job数据",

PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),

KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`),

KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`),

KEY `SCHED_NAME` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `qrtz_triggers` (

`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "调度器名称",

`TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器名称",

`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器组",

`JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "任务名称",

`JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "任务组",

`DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT "描述",

`NEXT_FIRE_TIME` bigint(13) DEFAULT NULL COMMENT "下次执行时间",

`PREV_FIRE_TIME` bigint(13) DEFAULT NULL COMMENT "上次执行时间",

`PRIORITY` int(11) DEFAULT NULL COMMENT "优先级",

`TRIGGER_STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发状态NONE, NORMAL, PAUSED, COMPLETE, ERROR, BLOCKED ",

`TRIGGER_TYPE` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发类型 SIMPLE CRON CALENDAR-INTERVAL",

`START_TIME` bigint(13) NOT NULL COMMENT "开始时间",

`END_TIME` bigint(13) DEFAULT NULL COMMENT "结束时间",

`CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT "日历名称",

`MISFIRE_INSTR` smallint(2) DEFAULT NULL COMMENT "错误指令",

`JOB_DATA` blob COMMENT "数据",

PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

KEY `IDX_QRTZ_T_J` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),

KEY `IDX_QRTZ_T_JG` (`SCHED_NAME`,`JOB_GROUP`),

KEY `IDX_QRTZ_T_C` (`SCHED_NAME`,`CALENDAR_NAME`),

KEY `IDX_QRTZ_T_G` (`SCHED_NAME`,`TRIGGER_GROUP`),

KEY `IDX_QRTZ_T_STATE` (`SCHED_NAME`,`TRIGGER_STATE`),

KEY `IDX_QRTZ_T_N_STATE` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),

KEY `IDX_QRTZ_T_N_G_STATE` (`SCHED_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),

KEY `IDX_QRTZ_T_NEXT_FIRE_TIME` (`SCHED_NAME`,`NEXT_FIRE_TIME`),

KEY `IDX_QRTZ_T_NFT_ST` (`SCHED_NAME`,`TRIGGER_STATE`,`NEXT_FIRE_TIME`),

KEY `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`),

KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),

KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),

KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

KEY `SCHED_NAME_2` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

KEY `SCHED_NAME_3` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

KEY `SCHED_NAME_4` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

KEY `SCHED_NAME_5` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `qrtz_job_details` (`sched_name`, `job_name`, `job_group`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `qrtz_simple_triggers` (

`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "调度器名称",

`TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器名称",

`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器组",

`REPEAT_COUNT` bigint(7) NOT NULL COMMENT "重复次数",

`REPEAT_INTERVAL` bigint(12) NOT NULL COMMENT "重复间隔",

`TIMES_TRIGGERED` bigint(10) NOT NULL COMMENT "触发次数",

PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `qrtz_cron_triggers` (

`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "调度器名称",

`TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器名称",

`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器组名称",

`CRON_EXPRESSION` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "cron表达式",

`TIME_ZONE_ID` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT "时区id",

PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `qrtz_simprop_triggers` (

`SCHED_NAME` varchar(120) COLLATE utf8mb4_general_ci NOT NULL,

`TRIGGER_NAME` varchar(190) COLLATE utf8mb4_general_ci NOT NULL,

`TRIGGER_GROUP` varchar(190) COLLATE utf8mb4_general_ci NOT NULL,

`STR_PROP_1` varchar(512) COLLATE utf8mb4_general_ci DEFAULT NULL,

`STR_PROP_2` varchar(512) COLLATE utf8mb4_general_ci DEFAULT NULL,

`STR_PROP_3` varchar(512) COLLATE utf8mb4_general_ci DEFAULT NULL,

`INT_PROP_1` int(11) DEFAULT NULL,

`INT_PROP_2` int(11) DEFAULT NULL,

`LONG_PROP_1` bigint(20) DEFAULT NULL,

`LONG_PROP_2` bigint(20) DEFAULT NULL,

`DEC_PROP_1` decimal(13,4) DEFAULT NULL,

`DEC_PROP_2` decimal(13,4) DEFAULT NULL,

`BOOL_PROP_1` varchar(1) COLLATE utf8mb4_general_ci DEFAULT NULL,

`BOOL_PROP_2` varchar(1) COLLATE utf8mb4_general_ci DEFAULT NULL,

PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `qrtz_blob_triggers` (

`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "调度器名称",

`TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器名称",

`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器组",

`BLOB_DATA` blob,

PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `qrtz_calendars` (

`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "调度器名称和",

`CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "日历名称",

`CALENDAR` blob NOT NULL COMMENT "日历",

PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `qrtz_paused_trigger_grps` (

`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器名称",

`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器组",

PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `qrtz_fired_triggers` (

`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "调度器名称",

`ENTRY_ID` varchar(95) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "入口id",

`TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器名称",

`TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器组",

`INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "实例名称",

`FIRED_TIME` bigint(13) NOT NULL COMMENT "触发时间",

`SCHED_TIME` bigint(13) NOT NULL COMMENT "调度时间",

`PRIORITY` int(11) NOT NULL COMMENT "优先级",

`STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "状态",

`JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT "任务名称",

`JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT "任务组",

`IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT "是否不同步",

`REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT "是否可请求恢复",

PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`),

KEY `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`,`INSTANCE_NAME`),

KEY `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`),

KEY `IDX_QRTZ_FT_J_G` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),

KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`),

KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),

KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `qrtz_scheduler_state` (

`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "触发器名称",

`INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "实例名称",

`LAST_CHECKIN_TIME` bigint(13) NOT NULL COMMENT "最后检查时间",

`CHECKIN_INTERVAL` bigint(13) NOT NULL COMMENT "检查间隔",

PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `qrtz_locks` (

`SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "调度器名称",

`LOCK_NAME` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT "锁名称",

PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

commit;

以上是 quartz数据库说明 的全部内容, 来源链接: utcz.com/z/516432.html

回到顶部