Run an Automated Task when a check fails

You can set up Automated Tasks to run when a check fails when you add or edit a task or a check. For example, you can have an automated task automatically deal with the cause of a check failure such as running a Clean All Temp Files Task when the Disk Space Check fails.

Automated Tasks are supported for Windows, Mac (from Agent 2.3.0), and Linux (from Agent 2).

The selected Automated Task only runs when a passing check fails and creates an entry in the Outages tab. The Automated Task does not continually run when a check is in the failed state—the check must first pass, then fail again before the Automated Task is triggered.

Tasks tab

To set up an Automated task to run when a check fails when you add or edit a task:

  1. On the N-sight RMM Dashboard North-pane, select the device
  2. You can add or edit a task:
    ChoiceAction
    Add a taskIn the South-pane Tasks tab, click Add Automated Task
    Edit a taskIn the South-pane Tasks tab, right-click the target Check and select Edit Check

    The Add Automated Task dialog opens.

  3. Select the script from the expandable sections that list the available scripts and click Next

    Only scripts that are uploaded for Automated Tasks and are associated with the device's Operating System are displayed.

  4. Enter a name for the task and enter any script parameters required for the selected Automated Task and select Next

    The following example shows the script parameters for the Active Directory Users Query task.

  5. In the Select Frequency Method drop-down menu, select On Check Failure
  6. Select which Check failure will trigger the task to run in When Check Fails, and select or enter additional settings if they are available in With These Settings... and select Next
  7. Set maximum permitted execution time for the script (optional)
  8. Select Finish to save and apply

Checks tab

To set up an Automated task to run when a check fails when you add or edit a check:

  1. On the N-sight RMM Dashboard North-pane, select the device
  2. You can add or edit a check:
    ChoiceAction
    Add a check
    1. In the South-pane Checks tab, click Add Check
    2. Choose the Check from Add 247 Check or Add DSC Check
    Edit a checkIn the South-pane Checks tab, right-click the target Check and select Edit Check
  3. Configure the check as required
  4. Enable Assign a Task after creating the Check and click OK

    The Add Automated Task dialog opens.

  5. Select the Automated Task script and select Next to configure

  6. Enter any required Command Line parameters or Script parameters and select Next
  7. Set maximum permitted execution time for the script (optional)
  8. Select Finish to save and apply

View check and Automated Task Association

All Automated Tasks associated with the check appear in the Checks tab in the Assigned Tasks column. Click the Assigned Tasks link to open the Tasks tab and view information about the Task.

If multiple Automated Tasks are associated with a check, the Assigned Tasks column reports the number of configured Tasks.

The Tasks tab includes a list of associated checks in the Assigned Check column. Click the Assigned Check link to open the Checks tab and view information about the check.

Any changes to the Automated Task are completed on the Tasks tab.