spring-framework / org.springframework.scheduling.config / CronTask

CronTask

open class CronTask : TriggerTask

TriggerTask implementation defining a Runnable to be executed according to a org.springframework.scheduling.support.CronSequenceGenerator.

Author
Chris Beams

Since
3.2

See Also
org.springframework.scheduling.annotation.Scheduled#cron()ScheduledTaskRegistrar#addCronTask(CronTask)

Constructors

<init>

CronTask(runnable: Runnable, expression: String)
CronTask(runnable: Runnable, cronTrigger: CronTrigger)

Create a new CronTask.

Functions

getExpression

open fun getExpression(): String

Return the cron expression defining when the task should be executed.