({{, (RefLink[TaskRemove, paclet:ref/TaskRemove])[task] 
terminates and removes the specified task.}})

OpenersNotesSection(Spacer1)Details

task can be either a (RefLink[TaskObject, paclet:ref/TaskObject]) or task identifier string for a specific task.

If a task is currently running, (RefLink[TaskRemove, paclet:ref/TaskRemove]) will attempt to abort it.

(RefLink[TaskRemove, paclet:ref/TaskRemove]) has attribute (RefLink[Listable, paclet:ref/Listable]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Create a task:

obj=SessionSubmit[ScheduledTask[Print[DateString[]],{1,100}]]

Remove the task using (RefLink[TaskRemove, paclet:ref/TaskRemove]):

TaskRemove[obj]

Create a task:

obj=SessionSubmit[ScheduledTask[Print[DateString[]],{1,100}]]

Obtain the task's UUID:

obj["TaskUUID"]

Remove the task using its UUID:

TaskRemove[obj["TaskUUID"]]

Create several tasks:

Table[SessionSubmit[ScheduledTask[Print[DateString[]],{1,100}]],{i,1,3}]

Remove all tasks that are running:

TaskRemove[Tasks[]]

OpenersExampleSection1(Spacer1)Scope  (1)

Use (RefLink[TaskRemove, paclet:ref/TaskRemove]) to delete scheduled executions of a cloud scheduled task or document generator:

obj=CloudSubmit[ScheduledTask[TimeObject[],"Daily"]]

TaskRemove[obj]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[TaskSuspend, paclet:ref/TaskSuspend])  ▪  (RefLink[TaskAbort, paclet:ref/TaskAbort])  ▪  (RefLink[TaskObject, paclet:ref/TaskObject])  ▪  (RefLink[Tasks, paclet:ref/Tasks])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Background & Scheduled Tasks, paclet:guide/BackgroundAndScheduledTasks])}})}})