Skip to main content

Managing Automation Tasks

You can do the following on automation tasks:

Adding an Automation Task

To add a new task

  1. Click Add task.

    The Create task screen appears.

  2. Enter the following information:

    Task fields

    Name

    Task name.

    Run as user

    Enter the username of the user who is the owner of this task. The owner of a task can edit and delete the task.

    Note:

    The task is owned by the Run as user, but it is available in the Web Client to any user with the schedule_angles privilege, and they can add actions to it.

    Note:

    If a user with the manage_system privilege creates a task or action, the Run as user field is empty by default.

    Maximum run time

    The maximum time allowed for a task to complete. (00:00 means no limit).

    Type

    Select Schedule:

    • Day - day(s) on which the task should run.
    • Start time - scheduled starting time to start the task. Note that the time is local time, taking into account Daylight Saving Time (DST) changes.

    or External:

    • Enable an external scheduling tool to trigger this task. After saving this task, the Action menu contains the Copy command option, which enables you to retrieve a command line that can be used in the external scheduler.

    or Event:

    • When new model available - select one of the available events.
    • [Model name] - select one of the available models.
    Day Select the day or days on which the task must run.
    Start time Select the start time in UTC. The time converted to your time zone will also be displayed.

    Enabled

    Enable or disable the task.

  3. Add one or more actions to the task, as described in Adding an action.

  4. Click Create and Save.

    You will return to the Tasks screen where the new task is shown in the overview.

To rearrange the order in which actions are executed

  1. Click MC_ChangeOrder in the first column.
  2. Drag the row to the desired position.
Note:

Use the Copy option from the Action menu to create a new task based on an existing one.

Adding an Action

An action specifies the datastore or program/script file that will be triggered by the task. You can add multiple actions to a task.

To add an action

  1. On the Create Task page, click Add action. The Add Action window appears.
  2. In the Run as User field, enter the username of the user who is the owner of this action.
  3. In the Action field, select Datastore or Program/script.
  4. For Datastore enter the following information:

    Datastore fields

    Model

    Automatically filled when the Angle is selected and checked.

    Angle

    This is the URI of the Angle you want to use for the export.

    1. Execute the Angle in the Web Client.
    2. Copy the last part of the address in the address bar (for example: models/1/angles/455/displays/2492).
    3. Click Check Angle to import the Angle details.

    Angle name

    Automatically filled when the Angle is selected and checked.

    Display

    You can select a different Display from the available Displays in the Angle display.

    Fail task if this action fails

    When checked, the Task will fail when this action fails. When unchecked, the Task will continue running even though this action fails.

    Approval state

    Only users with manage_system privilege can change the Approval state of a task.

    If users with manage_system privilege do not have permission to change the Approval state of a task, the Approval state dropdown is disabled.

    The following Approval states are available:

    • approved: The action will be executed as scheduled.
    • disabled: The action will not be executed.
    • requested: Request administrator to approve the request. (The actions will not be executed until an administrator approves the request).
    • rejected: The administrator has reviewed and rejected the action.

    Note: The default value is set to requested, so admins can control whether newly added actions should run or not.

    Tip: With sufficient privileges, you can define a standard approval state for new items in ​​Global settings > ​​​System settings​​

    Condition

    Use this setting to export only when a certain number of entries (objects) is reached.

    Datastore

    Select the datastore you want to add. The following Connection settings are available:

    • Datastore folder

      This is the path that is connected to a specific datastore. You can edit this path at ​Angle exports > ​​​Datastores​​​.

    • Action subfolder

      This is an optional subfolder to extend the Datastore path, where you want to save the output of this action. Consequently, you can use different subfolders for different actions while reusing the same datastore.

    • Output folder

      This field shows a preview of the full path of the location, where the output of this action will be saved. To test if the location is accessible, click Test connection.

    For the remaining description of the fields of the Data settings and Format options, see Datastores.

    Email settings

    Select the check box to specify the notification recipients.

    • Click Add recipient.

    • Enter the recipient's name and indicate whether the notification should be sent: on Result, Success and/or Failure.

    • Enter the notification text (macros are available).

  5. For Program/script enter the following information:

    Program or script file fields

    Program/script

    Select the program or script file you want to use in the action.

    You can only select .cmd, .exe, .ps1 and .bat files that are located in the designated folder. The location of this folder can be configured under system settings.

    Add arguments (optional)

    Add arguments to pass to the script. The syntax depends on the type of script that is used in this action.

    Username

    The username of the Run user for the program/script. This must be a valid Windows user with sufficient permissions.

    To use a domain user, prefix the username with "domain\". Without this prefix, a local user is used.

    Password

    The password of the Run user for the program/script. For security reasons, the password must always be re-entered before saving the action.

    Fail task if this action fails

    When checked, the Task will fail when this action fails.

    When unchecked, the Task will continue running even though this action fails.

    Approval state

    Only users with manage_system privilege can change the Approval state of a task.

    If users with manage_system privilege do not have permission to change the Approval state of a task, the Approval state dropdown is disabled.

    The following Approval states are available:

    • approved: The action will be executed as scheduled.

    • disabled: The action will not be executed.

    • requested: Request administrator to approve the request. (The actions will not be executed until an administrator approves the request).

    • rejected: The administrator has reviewed and rejected the action.

    Note: The default value is set to requested, so admins can control whether newly added actions should run or not.

    Tip: With sufficient privileges, you can define a standard approval state for new items in ​Global settings > ​​​System settings​​.

    Send a notification after the task has finished

    Select this check box to specify the notification recipients.

    1. Click Add recipient.

    2. Enter the recipient's name and indicate whether the notification should be sent: on Success and/or Failure.

    3. Enter the notification text (macro's are available).

    Note:

    The Check action button is only enabled when editing an existing action.

  6. Click OK.

    You will return to the Create task screen where the new action is shown.

Executing a Single Action from a Task

In some cases, you might want to only execute a single action from a task. For example, if you have added a new action to the task, you might want to test if it works without having to execute the entire task. In that case, you can execute the single action as an ad hoc task.

To test an action without executing the entire task

  1. Navigate to ​Angle exports > ​​​Automation tasks.
  2. Click MC_Edit2 next to the automation task that contains the action that you want to test. The Edit tasks screen is displayed.
  3. Find the action that you want to test in the list.
  4. Click MC_Edit next to the action and select Execute now.
  5. After the task is finished, the results are displayed.

The task history will contain the results of the ad hoc task. You can recognize an ad hoc task by the [Single Action] prefix.

Copying a Task

To copy a task based on an existing one

  1. On the Tasks screen, select Copy from the Action menu. The Copy task dialog appears.

  2. Enter the name for the new task and click OK.

  3. Select Edit from the Action menu to edit the task settings and/or the actions, as described above.

Copying an Action to a Task

    To copy an existing action to the same or another task

  1. Choose the task from which you want to copy an existing action and select Edit from the Action menu.

  2. On the Edit task screen, select Copy from the dropdown MC_Edit.

    The Copy action to task dialog appears.

    The current task is selected by default.

  3. Select the name of the task where you want to copy the action and click OK.

    Note:

    Once you copy an action to the current task, save the task by clicking Save .

  4. To modify a copied action, select Edit from the dropdown MC_Edit.

    Note:

    Editing a copied action will not change the original action.

Was this article helpful?

We're sorry to hear that.