Class ScheduledTask
java.lang.Object
org.springframework.scheduling.config.ScheduledTask
A representation of a scheduled task at runtime,
 used as a return value for scheduling methods.
- Since:
- 4.3
- Author:
- Juergen Hoeller, Brian Clozel
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionvoidcancel()Trigger cancellation of this scheduled task.voidcancel(boolean mayInterruptIfRunning) Trigger cancellation of this scheduled task.getTask()Return the next scheduled execution of the task, ornullif the task has been cancelled or no new execution is scheduled.toString()
- 
Method Details- 
getTask- Since:
- 5.0.2
 
- 
cancelpublic void cancel()Trigger cancellation of this scheduled task.This variant will force interruption of the task if still running. - See Also:
 
- 
cancelpublic void cancel(boolean mayInterruptIfRunning) Trigger cancellation of this scheduled task.- Parameters:
- mayInterruptIfRunning- whether to force interruption of the task if still running (specify- falseto allow the task to complete)
- Since:
- 5.3.18
- See Also:
 
- 
nextExecutionReturn the next scheduled execution of the task, ornullif the task has been cancelled or no new execution is scheduled.- Since:
- 6.2
 
- 
toString
 
-