Top Description Constructors Methods
org.springframework.scheduling.config

public Class OneTimeTask

extends DelayedTask
Class Inheritance
Imports
java.time.Duration

Task implementation defining a Runnable with an initial delay.
Author
Juergen Hoeller
Since
6.1
See Also
ScheduledTaskRegistrar#addOneTimeTask(DelayedTask)

Constructor Summary

AccessConstructor and Description
public
OneTimeTask(Runnable
the underlying task to execute
runnable
,
Duration
the initial delay before execution of the task
initialDelay
)

Create a new DelayedTask.

pack-priv

Method Summary

Inherited from org.springframework.scheduling.config.DelayedTask:
getInitialDelayDuration

Constructor Detail

OneTimeTaskback to summary
public OneTimeTask(Runnable runnable, Duration initialDelay)

Create a new DelayedTask.

Parameters
runnable:Runnable

the underlying task to execute

initialDelay:Duration

the initial delay before execution of the task

OneTimeTaskback to summary
pack-priv OneTimeTask(DelayedTask task)