RemoveScheduledTask

RemoveScheduledTask[obj]
removes obj from the list of currently scheduled local or cloud tasks.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (7)Basic Examples  (7)

Create a task that removes itself:

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

Create a task:

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

Remove the task:

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

Remove the task automatically when it is not needed:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input

The second task was automatically removed:

In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input

Non-synchronized tasks:

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

Better synchronization:

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

Create a task that runs only once and removes itself after finishing:

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

Create a task that removes itself once a condition is met:

In[1]:=
Click for copyable input

Create a task that removes itself when an external variable is changed:

In[1]:=
Click for copyable input

Cause the task to be stopped and removed:

In[2]:=
Click for copyable input
Out[2]=
Introduced in 2010
(8.0)
| Updated in 2014
(10.0)