Quartz调度器和设置cron [英] Quartz scheduler vs setting up cron

查看:203
本文介绍了Quartz调度器和设置cron的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

计划从设置cron作业到Quartz调度程序。
使用Quartz而不是设置cron的优点/缺点是什么?

Was planning to move from setting up cron jobs to Quartz scheduler. What are the pros/cons of using Quartz rather than setting up cron ?

取得此时间触发作业Cron或Quartz?链接。
任何其他指针?

Got this Time triggered job Cron or Quartz? link. Any other pointers ?

推荐答案

这里有石英的一些优点


  1. 如果使用基于操作系统的cron,jvm会上下移动,任何状态都会丢失。 / li>
  2. 它是可移植的(可以在没有cron的Win操作系统上运行)

  3. 您可以在quartz里安排多个线程

  4. 我们在tomcat中运行我们的调度程序,因此我们可以通过管理网页管理和查看应用程序的状态。在我们的应用程序中,我们使用jamon来监视我们的进程的状态。它可以回答这样的事情...哪些进程当前正在运行?他们上次什么时候跑?他们需要多长时间? cron不允许这样做。

  5. 您的代码将更容易移植。在不同的操作系统中进行不同的调度。

  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.

大概石英应该被看作是代替cron的替代品。

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

部分从这里

这篇关于Quartz调度器和设置cron的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆