Class DelayedTask

java.lang.Object
org.springframework.scheduling.config.Task
org.springframework.scheduling.config.DelayedTask
Direct Known Subclasses:
IntervalTask, OneTimeTask

public class DelayedTask extends Task
Task implementation defining a Runnable with an initial delay.
Since:
6.1
Author:
Juergen Hoeller
  • Constructor Details

    • DelayedTask

      public DelayedTask(Runnable runnable, Duration initialDelay)
      Create a new DelayedTask.
      Parameters:
      runnable - the underlying task to execute
      initialDelay - the initial delay before execution of the task
  • Method Details

    • getInitialDelayDuration

      public Duration getInitialDelayDuration()
      Return the initial delay before first execution of the task.