$ScheduledTask
$ScheduledTask
returns within a scheduled task the ScheduledTaskObject or CloudObject for the task.
Details
- If it is evaluated not within a scheduled task, $ScheduledTask gives None.
- $ScheduledTask is used to refer to the task within a task evaluation, e.g. to learn the parameters or stop the task.
Examples
Basic Examples (8)
Print the running scheduled task object:
Remove the scheduled task automatically when it is not needed:
Create a task with random wait periods:
Create a task that restarts evaluation as soon as it finishes:
Create a task that runs only once and removes itself after finishing:
Create a task that removes itself once a condition is met:
Create a task that removes itself when an external variable is changed:
Cause the task to be stopped and removed:
Synchronize scheduled tasks using an auxiliary task:
Text
Wolfram Research (2010), $ScheduledTask, Wolfram Language function, https://reference.wolfram.com/language/ref/$ScheduledTask.html (updated 2014).
CMS
Wolfram Language. 2010. "$ScheduledTask." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/$ScheduledTask.html.
APA
Wolfram Language. (2010). $ScheduledTask. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$ScheduledTask.html