spring-framework / org.springframework.scheduling.support / CronSequenceGenerator

CronSequenceGenerator

open class CronSequenceGenerator

Date sequence generator for a Crontab pattern, allowing clients to specify a pattern that the sequence matches.

The pattern is a list of six single space-separated fields: representing second, minute, hour, day, month, weekday. Month and weekday names can be given as the first three letters of the English names.

Example patterns:

Author
Dave Syer

Author
Juergen Hoeller

Author
Ruslan Sibgatullin

Since
3.0

See Also
CronTrigger

Constructors

<init>

CronSequenceGenerator(expression: String)

Construct a CronSequenceGenerator from the pattern provided, using the default TimeZone.

CronSequenceGenerator(expression: String, timeZone: TimeZone)

Construct a CronSequenceGenerator from the pattern provided, using the specified TimeZone.

Functions

equals

open fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

isValidExpression

open static fun isValidExpression(expression: String): Boolean

Determine whether the specified expression represents a valid cron pattern.

next

open fun next(date: Date): Date

Get the next Date in the sequence matching the Cron pattern and after the value provided. The return value will have a whole number of seconds, and will be after the input value.

toString

open fun toString(): String