gives the TaskObject[…] corresponding to the task in which it is being evaluated.


$CurrentTask
gives the TaskObject[…] corresponding to the task in which it is being evaluated.
Details

- $CurrentTask is set to the current TaskObject when evaluated within the task object or within a handler function for events generated by the task.
- If evaluated not within a task object, $CurrentTask gives None.
Examples
Basic Examples (4)
Create a task and show available properties:
Print previous and remaining run counts using $CurrentTask:
Related Guides
History
Text
Wolfram Research (2017), $CurrentTask, Wolfram Language function, https://reference.wolfram.com/language/ref/$CurrentTask.html.
CMS
Wolfram Language. 2017. "$CurrentTask." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$CurrentTask.html.
APA
Wolfram Language. (2017). $CurrentTask. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$CurrentTask.html
BibTeX
@misc{reference.wolfram_2025_$currenttask, author="Wolfram Research", title="{$CurrentTask}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/$CurrentTask.html}", note=[Accessed: 15-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_$currenttask, organization={Wolfram Research}, title={$CurrentTask}, year={2017}, url={https://reference.wolfram.com/language/ref/$CurrentTask.html}, note=[Accessed: 15-August-2025]}