public class

CronTrigger

extends Object
implements Trigger
java.lang.Object
   ↳ org.springframework.scheduling.support.CronTrigger

Class Overview

Trigger implementation for cron expressions. Wraps a CronSequenceGenerator.

Summary

Public Constructors
CronTrigger(String cronExpression)
Build a CronTrigger from the pattern provided in the default time zone.
CronTrigger(String cronExpression, TimeZone timeZone)
Build a CronTrigger from the pattern provided.
Public Methods
boolean equals(Object obj)
int hashCode()
Date nextExecutionTime(TriggerContext triggerContext)
Determine the next execution time according to the given trigger context.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.scheduling.Trigger

Public Constructors

public CronTrigger (String cronExpression)

Build a CronTrigger from the pattern provided in the default time zone.

Parameters
cronExpression a space-separated list of time fields, following cron expression conventions

public CronTrigger (String cronExpression, TimeZone timeZone)

Build a CronTrigger from the pattern provided.

Parameters
cronExpression a space-separated list of time fields, following cron expression conventions
timeZone a time zone in which the trigger times will be generated

Public Methods

public boolean equals (Object obj)

public int hashCode ()

public Date nextExecutionTime (TriggerContext triggerContext)

Determine the next execution time according to the given trigger context.

Parameters
triggerContext context object encapsulating last execution times and last completion time
Returns
  • the next execution time as defined by the trigger, or null if the trigger won't fire anymore

public String toString ()