Solon

xxl-job-solon-plugin

<dependency>
    <groupId>org.noear</groupId>
    <artifactId>xxl-job-solon-plugin</artifactId>
</dependency>

1、描述

分布式扩展插件。基于 xxl-job 适配的 solon cloud job 插件。

2、配置示例

solon.app:
  name: "demoapp"
  group: "demo"

solon.cloud.xxljob:
  server: "http://localhost:8093/xxl-job-admin"

solon.logging.logger:
  "io.netty.*":
    level: INFO

3、代码应用

public class DemoApp {
    public void main(String[] args) {
        SolonApp app = Solon.start(DemoApp.class, args);
    }
}

//分布式任务
@CloudJob(name = "demo_test", cron7x = "0 1 * * * ?")
public class Job_test implements CloudJobHandler {

    @Override
    public void handle(Context ctx) throws Throwable {
        //处理任务...
        log.info("我被调度了");
    }
}