Giter Club home page Giter Club logo

leaf-jobs's Introduction

leaf-jobs

一个简单的任务调度中心

  • rpc模块 netty
  • quartz-support模块 quartz集群模式
  • console模块 springboot控制台
  • jobs-starter模块 服务端需要依赖
  • test模块 spi的test模块

数据库脚本

  • leaf-jobs/db/customer.sql
  • leaf-jobs/db/tables_mysql_innodb.sql

服务端配置

可参考test模块

依赖

    <dependency>
        <groupId>com.leaf.jobs</groupId>
        <artifactId>jobs-spring-boot-starter</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </dependency>

支持springboot autoconfig

@SpringBootApplication
@JobsScanner(basePackages = "com.leaf.jobs")
public class SpiApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpiApplication.class, args);
    }
}

public interface HelloService {

    String sayHello(String name);

    String sayHello2(String name, String age);
}

@JobsProvider(group = "rjb")
@Slf4j
public class HelloServiceImpl implements HelloService {

    @Override
    public String sayHello(String name) {
        log.info("hi service" + name);
        return "ss: " + name;
    }

    @Override
    public String sayHello2(String name, String age) {
        log.info("hi service" + name);
        return "ss: " + name + age;
    }
}
    leaf:
        jobs:
          registerAddress: 172.16.2.203:2181
          systemName: rjb
          port: 9000
          script: true //支持推送shell脚本等执行

调度中心控制台

启动 com.leaf.jobs.JobsApplication 即可

后续

  • 日志回显优化
  • 脚本 groovy 执行
  • 子任务

leaf-jobs's People

Contributors

tiny-x avatar

Stargazers

 avatar  avatar

Watchers

 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.