Manage Tasks

Tasks are sets of instructions to execute a list of actions in a specified order. Tasks details are viewed and managed using the Manage Tasks dialog. This dialog is accessed by selecting Manage Tasks from the System Menu. The Manage Tasks window can remain open while navigating through the MetrixIDR user interface. The window has its own menu and toolbar. The actions available on the menu and toolbar are described in the Manage Tasks Menus section.

The Manage Tasks dialog consists of two tabs.

  • Scheduled Tasks. This tab lists and configures the Tasks scheduled to run
  • Saved Tasks. This tab lists and configures the Tasks that are not scheduled to run.

Scheduled Tasks

Scheduled Tasks are tasks which currently have an automated schedule defined for them. They may be enabled or disabled. Scheduled Tasks have the following fields assigned.

  • Task Name. This name is assigned by the user and is used to identify a task.

  • Description. This optional text field provides a text description of the task.

  • Assigned Server. Shows the server that is currently assigned to run the task. If no servers are assigned to the task, this field will be empty.

  • Enabled. Shows the status of the task (Enabled or Disabled).

  • Next Start Time. Shows the next start time for the task (Scheduled Tasks only).

  • Run Every. Shows the run interval for the task in minutes, hours, days or months (Scheduled Tasks Only).

  • Status. Shows the run status of the task.

  • Duration. Shows how long a task has been running.

  • Last Start Time. Shows the last time the task was started.

  • Last Stop Time. Shows the last time the task completed.

  • Last Result. Shows one of eight possible codes indicating the last result of the task execution. These codes are defined below.

    • 0 = Success. Task completed.

    • -1 = Killed. Task did not complete as expected. Task killed by interactive user.

    • -2= Failure. Task did not complete as expected. Batch Process returned an error code.

    • -3 = Set Not Running. The task status was set to running when the service was started. Task status was then set to Not Running.

    • -4 = Invalid Command Line. Task did not complete as expected. Batch Process possessed and invalid command line.

    • -5 = Create Runtime Failed. Task did not complete as expected. Task failed due to error in configuration of the application environment.

    • -6 = Invalid Task Name. Task did not complete as expected. Batch task has invalid name.

    • -7 = Create Task Failed. Task did not complete as expected. Task failed due to invalid arguments in the task set up.

  • Log Level. Sets the level of logging. The following options are available for log level: None, Task, Subtask, and Full. When set to Task, start and end information messages are logged for the task. When set to Subtask, start and end information messages are logged for each subtask. When set to Full, start and end information messages are logged for each event context.

  • Task Type. Indicates the type category for the task.

Saved Tasks

Saved tasks are tasks which do not have a schedule defined. They can be run manually from the task manager or used as components to a scheduled batch task. When a Saved Task is scheduled, it will move from the Saved Tasks list to the Scheduled Tasks List. Saved Tasks have the following fields assigned.

  • Task Name. This name is assigned by the user and is used to identify a task.
  • Description. This optional text field provides a text description of the task.
  • Status. Shows the run status of the task.
  • Duration. Shows how long a task has been running.
  • Last Start Time. Shows the last time the task was started.
  • Last Stop Time. Shows the last time the task completed.
  • Last Result. Shows one of eight possible codes indicating the last result of the task execution. These codes are defined in the Scheduled Tasks section.
  • Log Level. Sets the level of logging. The following options are available for log level: None, Task, Subtask, and Full. When set to Task, start and end information messages are logged for the task. When set to Subtask, start and end information messages are logged for each subtask. When set to Full, start and end information messages are logged for each event context.
  • Task Type. Indicates the type category for the task.

Add/Edit a Task

Adding and Editing a Task use the same Edit Task dialog box. To add a Task, select the Add Task action from the Manage Tasks Menus or the toolbar. To Edit a Task, select the Task and the Edit action. Once the Edit dialog box is open, configure the Task using the following fields.

  • Task ID. This is the Task Name.

  • Description. This is the Task Description.

  • Task Category. Task categories are groupings of the configured tasks. The categories help the user locate the desired task template. For example, the Estimation category shows the four Task Types related to estimating Models. The full listing of Task Categories and Task Types is listed in the Task Reference section.

  • Task Type. Indicates the type category for the task.

  • Log Level. Sets the level of logging. The following options are available for log level: None, Task, Subtask, and Full. When set to Task, start and end information messages are logged for the task. When set to Subtask, start and end information messages are logged for each subtask. When set to Full, start and end information messages are logged for each event context.

  • Arguments. The arguments box contains xml text used to pass arguments to the task. The specific arguments expected for each Task Type are shown below.

  • Schedule Task. If this box is checked, the Task will appear in the Scheduled Tasks List. If not, it will appear in the Saved Tasks list. Schedule Task can be set to run by number of Seconds, Minutes, Hours, Days or Months. When selected, the following schedule parameters are activated.

    • Start Time. Shows the time for when the Scheduled Task should begin.

    • Run Every. Determines the frequency of the Scheduled Task.

    • Time Selection. Determines the periodicity of the Run Every number. For example, if Run Every is set to 2 and the Time Selection is set to Days, the Scheduled Task will run every 2 days.

    • Enabled. This check box activates the Scheduled Task.

When saving a task, the task arguments are validated for syntax. A task with invalid arguments cannot be saved. Arguments are saved in XML format. The XML Editor to the right of the Arguments box will validate the XML. If invalid, the correct XML will be opened in this window.

Schedule a Task/Assign Servers

To Schedule a Task, select the Task and check the Schedule Task checkbox and fill in the schedule parameters. This action will move the Task from the Saved Tasks tab to the Scheduled Tasks tab. On the Scheduled Tasks tab, the Assigned Server field controls the application Servers for task execution and sets the priority order for servers. A scheduled task must be assigned to one or more servers.

To assign a server, the user should select Assign Server from the Server Menu (Manage Tasks Menus). The list of available servers and their status will be presented. If multiple servers are assigned to a task, the priority may be controls using the server assignment window underneath the server list. Use the arrows to change the assigned server priorities.