Quartz scheduler vs setting up cron

11,583

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

Share:
11,583
Mohit Verma
Author by

Mohit Verma

Updated on June 11, 2022

Comments

  • Mohit Verma
    Mohit Verma almost 2 years

    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 ?

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