|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
$ScheduledTask
$ScheduledTask
returns the current ScheduledTaskObject.
DetailsDetails
- Outside of a scheduled task evaluation, $ScheduledTask remains unevaluated.
- $ScheduledTask is used to refer to the task within a task evaluation, e.g., to learn the parameters or stop the task.
ExamplesExamplesopen allclose all
Basic Examples (8)Basic Examples (8)
Print the running scheduled task object:
| In[1]:= |
| Out[1]= |
| In[2]:= |
| Out[2]= |
| In[3]:= |
Remove the scheduled task automatically when it is not needed:
| In[1]:= |
| In[2]:= |
| Out[2]= |
| In[3]:= |
| Out[3]= |
| In[4]:= |
| In[5]:= |
| Out[5]= |
| In[6]:= |
Create a task with random wait periods:
| In[1]:= |
| In[2]:= |
| In[3]:= |
| In[4]:= |
Create a task that restarts evaluation as soon as it finishes:
| In[1]:= |
| In[2]:= |
| In[3]:= |
Create a task that runs only once and removes itself after finishing:
| In[1]:= |
| In[2]:= |
| Out[2]= |
Create a task that removes itself once a condition is met:
| In[1]:= |
Create a task that removes itself when an external variable is changed:
| In[1]:= |
Cause the task to be stopped and removed:
| In[2]:= |
| Out[2]= |
Synchronize scheduled tasks using an auxiliary task:
| In[1]:= |
| Out[1]= | ![]() |
| In[2]:= |
| In[3]:= |
| Out[3]= | ![]() |
| In[4]:= |
The auxiliary task
was removed:
| In[5]:= |
| Out[5]= |
| In[6]:= |
New in 8
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »



