简体   繁体   English

在Java / Spring中调度任务

[英]Scheduling tasks in Java/Spring

There is a requirement in the project that will have a scheduled task that will do some job. 项目中有一项要求将具有可以完成某项工作的计划任务。

The project is Spring based and the scheduled job will be part of the application war.I have never implemented this kind of functionality before. 该项目是基于Spring的,预定的工作将是应用程序之战的一部分。我之前从未实现过这种功能。

I have heard of Quartz. 我听说过石英。 Also, I read somewhere that Spring provides some functionality to schedule tasks. 另外,我在某处读到Spring提供了一些安排任务的功能。 So, I was thinking if I am already using Spring then why to go for some other API(Quartz). 所以,我在想如果我已经在使用Spring那么为什么要使用其他API(Quartz)。

I am not sure which one to use? 我不确定使用哪一个? what will be the pros/cons of one over another? 一个人的利弊会是什么?

Please suggest what will be the best way to approach my requirement. 请建议什么是满足我的要求的最佳方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM