RemoveScheduledTask

RemoveScheduledTask[obj]
remove the obj from the list of currently set 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:

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

Remove the timer:

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

Remove the timer 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 timers:

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]=
New in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »