$CurrentTask

$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:

Display task's identifier:

Print task's current status:

Print run counts of the task:

Print previous and remaining run counts using $CurrentTask:

Wolfram Research (2017), $CurrentTask, Wolfram Language function, https://reference.wolfram.com/language/ref/$CurrentTask.html.

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_2024_$currenttask, author="Wolfram Research", title="{$CurrentTask}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/$CurrentTask.html}", note=[Accessed: 23-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_$currenttask, organization={Wolfram Research}, title={$CurrentTask}, year={2017}, url={https://reference.wolfram.com/language/ref/$CurrentTask.html}, note=[Accessed: 23-November-2024 ]}