easy-batch job scheduling

Scheduled using ScheduledExecutorService

Because the job is implemented, java.util.concurrent.Callableit can be scheduled based on ScheduledExecutorService

  • Reference Code
Job job = ..;
ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(5);
ScheduledFuture scheduledFuture = scheduledExecutorService.schedule(job, 5, TimeUnit.SECONDS);

Use Quartz

It contains a easybatch-quartzmodule, but the downside is that 6.0 is removed, but still can learn to use
we can EasyBatchJob && EasyBatchJobFactory easy integration Quartz

References

https://github.com/j-easy/easy-batch/wiki/job-scheduling
https://github.com/j-easy/easy-batch/blob/master/easy-batch-tutorials/src/main/java/org/jeasy/batch/tutorials/advanced/quartz/Launcher.java

Guess you like

Origin www.cnblogs.com/rongfengliang/p/12728854.html