Quartz is an open-source job scheduling library, which can be integrated with any Java application. It can be used for scheduling few jobs to thousands of jobs at scale according to the requirement. It can be used for clustering as well as Java Transaction API.
If our application has to perform some tasks at certain moments, or if our system has to perform some recurring jobs, the Quartz is an ideal solution. An example of such a job is discussed below.
Process Workflow | Schedule a Job to fire in a certain interval, that will execute some tasks which are inter-dependent, but do not form a dependency cycle. |
System Maintenance | Schedule a job to backup database server at the end of the day (EOD). |
An example code is given below.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.