Taskman Internals

From VistApedia
Revision as of 18:59, 18 August 2015 by Shabiel (talk | contribs) (Taskman components)
Jump to: navigation, search

Taskman components

Routines

  •  %ZTLOAD (API to create a task)
  • Manager
  • Sub-manager
  • The menu options to use to manipulate Taskman

Globals

  •  %ZTSCH (the tasks "index" plus control structures for taskman... not a Fileman file)
  •  %ZTSK (Tasks Fileman file)

^%ZTSK Structure

^%ZTSK contains the actual task.

^%ZTSK(-1) contains the most recently assigned task.

.1 node: Current Status

  • 1 -> Scheduled by %ZTLOAD
  • 2 -> Not on any list
  • L -> Rejected
  • 3 -> In Job List
  • A -> In IO List
  • 4 -> Not on any index, but prepping
  • 5 -> On task list (i.e. running)
  • 6 -> Succeeded (NB: may not see this if task gets deleted immediately)

.2 node: IO

.3 node: Variables to use in the task

^%ZTSCH Structure

^%ZTSCH has indexes on the task file. It decides when a task will be run.

^%ZTSCH(seconds, task number) is the index of what to do when. The number of seconds is since the $H epoch.

Once a task is ready to run,