Class CronTask
java.lang.Object
org.springframework.scheduling.config.Task
org.springframework.scheduling.config.TriggerTask
org.springframework.scheduling.config.CronTask
TriggerTask implementation defining a Runnable to be executed according
to a standard cron expression.- Since:
- 3.2
- Author:
- Chris Beams
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the cron expression defining when the task should be executed.Methods inherited from class org.springframework.scheduling.config.TriggerTask
getTriggerMethods inherited from class org.springframework.scheduling.config.Task
getRunnable, toString
-
Constructor Details
-
CronTask
Create a newCronTask.- Parameters:
runnable- the underlying task to executeexpression- the cron expression defining when the task should be executed
-
CronTask
Create a newCronTask.- Parameters:
runnable- the underlying task to executecronTrigger- the cron trigger defining when the task should be executed
-
-
Method Details
-
getExpression
Return the cron expression defining when the task should be executed.
-