Quartz scheduler vs setting up cron

对着背影说爱祢 提交于 2019-12-01 05:59:34

I have used and like quartz. Here are some advantages of quartz

  1. If you use an OS based cron the jvm would go up and down and any state would be lost.
  2. it is portable (can run on Win OS where no cron available)
  3. You can schedule multiple threads within quartz
  4. We run our scheduler in tomcat and so we can manage and see the state of the app via admin web pages. In our app we use jamon to monitor the state of our processes. It can answer such things as... Which processes are currently running? When did they last run? How long did they take? etc. cron would not allow this.
  5. Your code would be more portable. Scheduling is done differently in different OS's.

Probably quartz should be seen more as a replacement for launching new threads than as a replacement of cron.

partially stolen from here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!