Git Product home page Git Product logo

quartzcluster's Introduction

Spring boot Quartz 集群

  • 采用Gradle构建
  • 基于Mysql做的Quartz集群
  • 可以同时同一个任务只支持一个服务器执行

环境

  • Java 1.8
  • Gradle 1.4+
  • SpringBoot 1.4.3
  • Spring 4.3.5
  • Quartz 2.2.1+
  • MySql

配置

  • mysql数据库中新建一个库
  • 将quartz.sql导入该库
  • 修改 application-dev.properties中
    • server.port端口号
    • spring.datasource 配置
  • 修改 quartz.properties 中
    • org.quartz.dataSource.myDS.URL地址

用法

  • java -jar quartzcluster.jar -Dinfo

  • 源码执行 gradle bootRun

  • eclipse 中运行

  • 可以在不同机器起两个实例或者在一台机器修改server.port为不同端口起两个实例,通过停止一个实例查看quartz任务切换.

  • 访问localhost:8080可以查看加载了哪些类

  • output和logs.log可以查看任务执行情况

quartzcluster's People

Stargazers

 avatar

Watchers

 avatar  avatar  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.