$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)Summary of the most common use cases
Print the running scheduled task object:

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-c5o4tf


https://wolfram.com/xid/0dpbmr66mwjt7o9fm-boit22


https://wolfram.com/xid/0dpbmr66mwjt7o9fm-wgef6
Remove the scheduled task automatically when it is not needed:

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-pto460

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-c2oe82


https://wolfram.com/xid/0dpbmr66mwjt7o9fm-fq79yo


https://wolfram.com/xid/0dpbmr66mwjt7o9fm-cbjvc6

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-k9y8jd


https://wolfram.com/xid/0dpbmr66mwjt7o9fm-o0v34
Create a task with random wait periods:

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-mhphd8

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-3luuj

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-bn1v1p

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-dgkwwx
Create a task that restarts evaluation as soon as it finishes:

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-io6bn5

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-jr7onh

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-fy76p7
Create a task that runs only once and removes itself after finishing:

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-l8x0rg

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-dnj433

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

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-f14vww
Create a task that removes itself when an external variable is changed:

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-jq9ld8
Cause the task to be stopped and removed:

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-cue4py

Synchronize scheduled tasks using an auxiliary task:

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-nr5on


https://wolfram.com/xid/0dpbmr66mwjt7o9fm-cmyszo

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-fn5fyn


https://wolfram.com/xid/0dpbmr66mwjt7o9fm-bylrwn
The auxiliary task x1 was removed:

https://wolfram.com/xid/0dpbmr66mwjt7o9fm-cmiy3b


https://wolfram.com/xid/0dpbmr66mwjt7o9fm-d99w61
Wolfram Research (2010), $ScheduledTask, Wolfram Language function, https://reference.wolfram.com/language/ref/$ScheduledTask.html (updated 2014).
Text
Wolfram Research (2010), $ScheduledTask, Wolfram Language function, https://reference.wolfram.com/language/ref/$ScheduledTask.html (updated 2014).
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.
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
Wolfram Language. (2010). $ScheduledTask. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$ScheduledTask.html
BibTeX
@misc{reference.wolfram_2025_$scheduledtask, author="Wolfram Research", title="{$ScheduledTask}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/$ScheduledTask.html}", note=[Accessed: 01-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_$scheduledtask, organization={Wolfram Research}, title={$ScheduledTask}, year={2014}, url={https://reference.wolfram.com/language/ref/$ScheduledTask.html}, note=[Accessed: 01-April-2025
]}