TaskAbort

TaskAbort[task]

generates an interrupt to abort the current execution of a task.

Details

  • task can be either a TaskObject or task identifier string for a specific task.
  • TaskAbort works on tasks initiated by CloudSubmit, LocalSubmit and URLSubmit.
  • For a scheduled task, TaskAbort aborts only the currently executing instance of the task and does not affect subsequent scheduled instances.
  • TaskAbort[task] does nothing if task does not correspond to a currently executing task.
  • TaskAbort[task] initiates an abort, then returns immediately, giving the TaskObject[] of the task.
  • TaskAbort has attribute Listable.

Examples

Basic Examples  (1)

Deploy a task with no schedule:

In[1]:=
Click for copyable input
Out[1]=

Attempt an abort of a task that is not running:

In[2]:=
Click for copyable input
Out[2]=

Check the task status:

In[3]:=
Click for copyable input
Out[3]=

Delete the task:

In[4]:=
Click for copyable input
Out[4]=

See Also

TaskSuspend  TaskRemove  Tasks  TaskObject  Abort

Introduced in 2017
(11.2)