Timer UNIX crontab vs quartz

Source: Internet
Author: User
  1. UsingcronSeems to add another entry point into your application, whileQuartzWocould integrate into it. So you wocould be forced to deal with some inter-process communication if you wanted to pass some information to/from the process invoked fromcron. InQuartzYou simply (hehe) run multiple threads. cron is the process level, and quartz is the thread level. If there is dependency and communication relationship between tasks, cron is a big problem, while quartz only needs to consider how to schedule threads.
  2. cronIs platform dependent,QuartzIs not. cron depends on the UNIX platform, while quartz enables cross-platform
  3. QuartzMay allow you to reliably make sure a task is run at the given time or some time after if the server was down for some time. PurecronWouldn't do it for you (unless you handle it manually). Quartz will ensure that the task will be re-executed at the specified time even if the service is restarted, while cron will not
  4. QuartzHas a more flexible language of expressing occurences (when the tasks shocould be fired). quarz supports more abundant execution commands
  5. Consider the memory footprint. if your single tasks share nothing or little, then it might be better to run them from the operating system as a separate process. if they share a lot of information, it's better to have them as threads within one process. quartz occupies less memory and executes multiple tasks in a single process, while cron is a separate process.
  6. Not quite sure how you cocould handle the clustering incronApproach.QuartzMight be used with terracotta following the scaling out pattern (I haven't tried it, but I believe it's doable ).
  7. In addition, quartz supports tasks in seconds, while cron supports tasks in minutes. quratz provides a visual task management interface, which improves monitoring, O & M, and robustness.
  8. Quartz Clusters

Original article: Workshop

Timer UNIX crontab vs quartz

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.