# springboot-dynamic-task **Repository Path**: 7sh/springboot-dynamic-task ## Basic Information - **Project Name**: springboot-dynamic-task - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-05-27 - **Last Updated**: 2021-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 动态定时任务模块 总体思路: ![](Task-20210527175705.png) 数据库表 ``` -- 任务配置表 create table dynamic_task_config ( id int auto_increment primary key, name varchar(255) null comment '名称', remark varchar(255) null comment '描述', bean_name varchar(255) not null comment 'bean名称', cron varchar(56) not null, status int default 0 null comment '0 ok 1 禁用', create_time datetime null, update_time datetime null, constraint dynamic_task_config_beanName_uindex unique (bean_name) ); -- 日志表 CREATE TABLE `dynamic_task_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `task_name` varchar(128) DEFAULT NULL COMMENT '执行任务名称', `task_class` varchar(256) DEFAULT NULL COMMENT '执行器类名', `status` int(4) DEFAULT NULL COMMENT '执行结果状态0异常,1成功', `exec_time` bigint(20) DEFAULT NULL COMMENT '耗时(单位为毫秒)', `exec_host` varchar(64) DEFAULT NULL COMMENT '执行的主机IP', `create_time` datetime DEFAULT NULL COMMENT '创建时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=181 DEFAULT CHARSET=utf8; ```