Class OneTimeTask
java.lang.Object
org.springframework.scheduling.config.Task
org.springframework.scheduling.config.DelayedTask
org.springframework.scheduling.config.OneTimeTask
Task
implementation defining a Runnable
with an initial delay.- Since:
- 6.1
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorDescriptionOneTimeTask
(Runnable runnable, Duration initialDelay) Create a newDelayedTask
. -
Method Summary
Methods inherited from class org.springframework.scheduling.config.DelayedTask
getInitialDelayDuration
Methods inherited from class org.springframework.scheduling.config.Task
getRunnable, toString
-
Constructor Details
-
OneTimeTask
Create a newDelayedTask
.- Parameters:
runnable
- the underlying task to executeinitialDelay
- the initial delay before execution of the task
-