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

Introduced in 2017
 (11.2)