After posting the question, I looked at the content on the Internet and found useful information about the same. Sorry to post the question and answer it myself, but that would be helpful to anyone who might want to understand the same thing.
Here are the advantages of Quartz and its comparison with the regular Java timer interface:
- Quartz is quite flexible and contains several usage paradigms that can be used separately or together to achieve the desired behavior and allow you to write your code in a way that seems most “natural” to your project.
- Quartz is very lightweight and requires very little setup / configuration - it can actually be used out of the box if your needs are relatively simple.
- Quartz is fault tolerant and can save (“remember”) scheduled tasks between system restarts.
On the other hand, it overcomes the following problems in the timer interface:
- Timers do not have a save mechanism.
- Timers have inflexible scheduling (only for setting the start and repeat times, nothing depends on dates, time of day, etc.).
- Timers do not use a thread pool (one thread per timer)
- Timers do not have real control schemes - you will have to write your own mechanism for remembering, organizing and searching for your tasks by name, etc.
If someone wants to add any information to the above, please feel free to.
source share