GithubHelp home page GithubHelp logo

bellmit / dynamicscheduletaskdemo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grafiechen/dynamicscheduletaskdemo

0.0 0.0 0.0 12 KB

一个基于数据库动态管理定时任务的demo

Java 100.00%

dynamicscheduletaskdemo's Introduction

dynamicScheduleTaskDemo

一个基于数据库动态管理定时任务的demo

基于MySQL作为持久化,管理定时任务。

对定时任务管理主要是实现SchedulingConfigurer接口,并在实现类中维护一个ConcurrentHashMap<Integer, ScheduledFuture<?>>,通过对map的操作,做到添加、停止定时任务的功能。

DDL

create table t_work_info
(
    id              int auto_increment not null primary key,
    work_name       varchar(20) not null COMMENT "工作名称",
    start_date_time timestamp,
    work_content    varchar(50) not null,
    create_time     timestamp   not null,
    update_time     timestamp,
    status          int(1) not null COMMENT "状态 -1删除,0 启用,1 停用"
) ;
create table t_work_cron
(
    id            int auto_increment not null primary key,
    cron          varchar(20) not null COMMENT "定时任务 ron 表达式",
    end_date_time timestamp,
    work_info_id  int         not null COMMENT "t_work_info表id",
    status        int(1) not null  COMMENT "状态 -1删除,0 启用,1 停用"
)

dynamicscheduletaskdemo's People

Contributors

grafiechen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.