Java 任务调度 Rafiki

码农软件 · 软件分类 · 作业/任务调度 · 2019-09-04 15:11:40

软件介绍

Rafiki 是一个基于Java的任务调度框架,相对于Quartz更加轻量级和易用

  • 支持简单的重复任务调度

  • 支持Cron格式的任务调度

  • 采用任务容器/任务组的方式进行任务群分类

  • 支持同时超过10K任务同时执行(视机器效率)

  • 支持失败任务提醒和失败任务自动重执行

安装方式:

<dependency>
    <groupId>org.pinae</groupId>
    <artifactId>rafiki</artifactId>
    <version>1.2</version>
</dependency>

示例代码:

public class DemoTestManager {
    public static void main(String arg[]) throws Exception {
        Task task = new Task();
        Job job = new Job() {
            public String getName() {
                return "DelayJob";
            }

            public boolean execute() throws JobException {
                System.out.println(System.currentTimeMillis());
                return true;
            }
        };

        task.setName("HelloJob");
        task.setJob(job);
        task.setTrigger(new CronTrigger("0-30/5 * * * * * *"));

        TaskContainer container = new TaskContainer();
        container.add(task);
        container.start();
    }
}

本文地址:https://codercto.com/soft/d/13865.html

Algorithms in C (Computer Science Series)

Algorithms in C (Computer Science Series)

Robert Sedgewick / Addison-Wesley Professional / 1990-01-11 / USD 59.99

This new version of the best-selling book, Algorithms, SecondEdition, provides a comprehensive collection of algorithmsimplemented in C. A variety of algorithms are described in eachofthe following ar......一起来看看 《Algorithms in C (Computer Science Series)》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具