Difference between Quartz Job and Scheduling Tasks with Spring?

后端 未结 1 1663
别那么骄傲
别那么骄傲 2021-01-31 05:24

I am new to Spring-boot(version 1.3.6) and Quartz and I am wondering what is the difference between making a task with Spring-scheduler:

    @Scheduled(fixedRate         


        
相关标签:
1条回答
  • 2021-01-31 05:50

    Spring Scheduler is an abstraction layer written to hide the implementations of Executors in different JDKs like Java SE 1.4, Java SE 5 and Java EE environments, which have their own specific implementations.

    Quartz Scheduler is a fully fledged scheduling framework which allows CRON based or Simple periodic task execution.

    Spring Scheduler does provide integration with Quartz scheduler in the form of a Trigger to use the full functionality of the Quartz scheduler.

    Advantage of using Spring Scheduler without directly using the Quartz Scheduler specific classes is that the abstraction layer provides flexibility and loose coupling.

    0 讨论(0)
提交回复
热议问题