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:

  • Seconds
  • Minutes
  • Hours
  • Day-of-Month
  • Month
  • Day-of-Week
  • 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.