Package org.springframework.scheduling.config

# Class FixedRateTask

java.lang.Object
org.springframework.scheduling.config.Task
org.springframework.scheduling.config.DelayedTask
org.springframework.scheduling.config.IntervalTask
org.springframework.scheduling.config.FixedRateTask

public class FixedRateTask extends IntervalTask
Specialization of `IntervalTask` for fixed-rate semantics.

Since:
  5.0.2
Author:
  Juergen Hoeller, Arjen Poutsma
See Also:
  - `Scheduled.fixedRate()`
  - `ScheduledTaskRegistrar.addFixedRateTask(IntervalTask)`

## Constructor Summary

Constructors
Constructor
Description
`FixedRateTask(Runnable runnable, long interval, long initialDelay)`
Deprecated.
as of 6.0, in favor on `FixedRateTask(Runnable, Duration, Duration)`
`FixedRateTask(Runnable runnable, Duration interval, Duration initialDelay)`
Create a new `FixedRateTask`.

## Method Summary

### Methods inherited from class org.springframework.scheduling.config.IntervalTask

`getInitialDelay, getInitialDelayDuration, getInterval, getIntervalDuration`

### Methods inherited from class org.springframework.scheduling.config.Task

`getLastExecutionOutcome, getRunnable, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### FixedRateTask

@Deprecated(since="6.0") public FixedRateTask(Runnable runnable, long interval, long initialDelay)
Deprecated.
as of 6.0, in favor on `FixedRateTask(Runnable, Duration, Duration)`
Create a new `FixedRateTask`.

Parameters:
  `runnable` - the underlying task to execute
  `interval` - how often in milliseconds the task should be executed
  `initialDelay` - the initial delay before first execution of the task

### FixedRateTask

public FixedRateTask(Runnable runnable, Duration interval, Duration initialDelay)
Create a new `FixedRateTask`.

Parameters:
  `runnable` - the underlying task to execute
  `interval` - how often the task should be executed
  `initialDelay` - the initial delay before first execution of the task
Since:
  6.0