• September 4, 2014
  • Quartz Scheduler
  • Comments Off on Quartz scheduler components

Quartz scheduler components

Quartz job:

Quartz job is used for the logic or code which you want to execute. It implements org.quartz.Job interface.

Quartz trigger:

Quartz trigger is used to define the moment when the quartz scheduler will execute quartz’s job.

Types of quartz trigger:

1. SimpleTrigger – SimpleTrigger setting start time, end time, repeat count and repeat interval for quartz’s job.

SimpleTrigger’s Constructors:

public SimpleTrigger(String name, String group, Date startTime, Date endTime, int repeatCount, long repeatInterval)

2. CronTrigger – CronTrigger uses cron expressions to specify the moment when to execute quartz’s job. A cron expression is made up of seven sub expressions:

  1. a. Seconds
  2. b. Minutes
  3. c. Hours
  4. d. Day-of-Month
  5. e. Month
  6. f. Day-of-Week
  7. g. Year (optional field)

3. Scheduler class – Scheduler class is used to connect the quartz job and quartz trigger together and execute the job.
 
Next Topic: Quartz 1.6 example using SimpleTrigger with example.
Previous Topic: Quartz scheduler.

Related Topics:

How to build java project using ant in eclipse?
JAXB marshalling – convert java object to xml example.
How to create pdf file in java using iText jar?
Generics class example.
OGNL in struts 2.
Hibernate One-to-One Mapping using xml.
Send inline image in email using JavaMail API.
Quartz 2 JobListener example.

 


Comments are closed.