Scheduling Enforcement Set Runs
  • 25 Jan 2024
  • 8 Minutes to read
  • Dark
    Light
  • PDF

Scheduling Enforcement Set Runs

  • Dark
    Light
  • PDF

Article Summary

You can schedule an Enforcement Set to run at specified times and under certain conditions. This enables you to automate Enforcement Set runs. Scheduling criteria are available at the bottom of every Enforcement Set drawer.
For multiple Enforcement Sets that are scheduled to run at the same time every global discovery cycle, it is possible to set an order of running them by assigning to them priorities. Learn more on how to set the run priority levels of Enforcement Sets.
In a multi-action Enforcement Set, you can also automate the execution of a Post, Success, or Failure Enforcement action to run at a later time. Learn more on how to delay Enforcement Action runs.

EnforcementSetScheduling

To schedule an Enforcement Set run

  1. In the Edit Enforcement Set page, toggle on Set scheduling and set the parameters you want.
    • Repeat schedule run

      • Every global discovery cycle - The Enforcement Set will run on the same schedule as the global discovery cycle, at the end of the cycle. See Discovery Cycle for more information about Discovery Cycles.

        • You can set the run priority level of one or more Enforcement Sets configured to run every global discovery cycle, directly from the Enforcement Sets page.
      • Note:

        The Enforcement Set runs during the last phase of the discovery cycle after adapter fetches are finished, even if they are not successful. You can enable the Only when following adapter connections successfully completed fetch earlier in discovery cycle option (see below) to ensure that the Enforcement Set runs only if the adapter fetches are completed successfully.

      • Every x hours - In Scheduled run every (hours), enter the hour interval for runs.

        ECSchedule-hours-fix

      • Every x days - In Scheduled run every (days), enter the day interval for runs.

        ECSchedule-days.png

      • Days of week - In Scheduled run day(s), a tile for each weekday is added by default. Click the x on the tile to remove a day. You can also click in the field and select or clear days from the list. The Enforcement Set will run only on the days whose tile appears.

        ECSchedule-daysofWeek.png

      • Days of month - In Scheduled run day(s), a tile for the first day of the month is added by default. Click in the field and select or clear days from the list. Tiles for selected days are added and tile for cleared days are removed. Click the x on the tile to remove a day. The Enforcement Set will run only on the days whose tile appears.

        ECSchedule-month.png

    • Scheduled run time - Click in the field and select a time from the list. The Enforcement Set will run on the days selected above and at the time selected here. If you have multiple Enforcement Sets, schedule them to run at different times to reduce network traffic.
      ECSchedule-time.png

    • Run on added entities only - Select this option to run the Enforcement Set only on assets discovered since the last global discovery cycle.

      Note:

      When this option is enabled, the first run of the Enforcement Set is on all assets matching the query.

    • Run on top N results only - Select this option to run the Enforcement Set only on the first N assets that match the query. Sorting the query results may result in a different set of top N results.

    • Wait until cycle ends - Select this option to run the Enforcement Set only after a discovery cycle in progress has completed. This means that all Enforcement Sets with this option enabled and that were scheduled to start while the discovery cycle is in progress, are postponed to run at the end of the discovery cycle. Before choosing this option, decide whether running the Enforcement Set on up-to-date data significantly justifies delaying its execution.
      Use case example: An Enforcement Set that creates CMDB assets is scheduled to run daily at 11:00. Enabling the Wait until cycle ends option guarantees that this Enforcement Set runs after all assets are fully updated by all adapters and correlations.

Note:
The Wait until cycle ends option is not relevant when:

  • No discovery cycle is running at the scheduled trigger time of the Enforcement Set.
  • The Enforcement Set is configured to run at the end of Every global discovery cycle.
  • Only when following adapter connections successfully completed fetch earlier in discovery cycle - Select this option to run the Enforcement Set only if the adapter connections selected in the dropdown completed successfully their fetches. This ensures that the Enforcement Set runs on updated asset data. This option is available in one of these two cases:
    • If Repeat schedule run is set to Every global discovery cycle.
    • If Repeat schedule run is set to specific days or hours AND the Wait until cycle ends option is enabled.

EnforcementSetSchedulingAdapterFetchDropdown

Note:
When you enable the Only when following adapter connections successfully completed fetch earlier in discovery cycle option and select adapter connections from the dropdown, these adapter connections are remembered, even after you disable this option and then re-enable it.

  • Additional conditions - Select as many additional conditions as you need.

    • Only when assets have been added since the last execution - The Enforcement Set will run only when the asset count is higher than the previous run. If this is the first run, the Enforcement Set will run on all assets that match the Enforcement Set query.

    • Only when assets have been removed since the last execution - The Enforcement Set will run only when the asset count is less than the previous run. If this is the first run, the Enforcement Set will run on all assets that match the Enforcement Set query.

    • Only when the number of assets is above N - Enter a number in the text box that appears to the right. The Enforcement Set runs only when the asset count is above this number. When N is 0 (zero) and no assets match the query, the Enforcement Set is not run.

    • Only when the number of assets is below N - Enter a number in the text box that appears to the right. The Enforcement Set runs only when the asset count is below this number.

Setting the Run Priority

By default, all Enforcement Sets scheduled to run every global discovery cycle run in the order that they are submitted. You can control the order that Enforcement Sets run by assigning them a run priority level. This is of significance when multiple Enforcement Sets running at the same time are dependent on each other. For example, when an Enforcement Set that removes assets and one that creates CMDB assets in third party systems run at the same time.
Enforcement Sets of a higher priority level run before those of lower priority levels. Run Priorities range from 1 (highest priority; first to run) to 10 (lowest priority; last to run). By default, all runs have priority level 5. All Enforcement Sets of the same run priority are run in a discovery cycle in the order that they are submitted.
From the Enforcement Center Page, you can edit inline the run priority of a single Enforcement Set, or from the More Actions menu, change the priority of one or more Enforcement Sets.

Editing Inline the Run Priority of a Single Enforcement Set

You can edit inline the run priority of a single enforcement set.

To edit inline the run priority of a single Enforcement Set

  1. In the table on the Enforcement Sets page, hover over the run priority of an Enforcement Set and click the pencil icon PencilIcon

RunPriorityInlineEdit

The Edit Run Priority dialog opens with the current run priority selected.
EditInlineRunPriority

  1. From the dropdown, select the new run priority, and then click Save Changes. The run priority of the Enforcement Set is updated in the Enforcement Sets table Priority column.

Changing the Run Priority of Enforcement Sets

You can use an action to change the run priority of one or more enforcement sets with Scheduling Type = Every global discovery cycle.

Note:

The Change Run Priority action is disabled in the following cases:

  • When you select all Enforcement Sets.
  • If any of your selected Enforcement Sets are not scheduled every global discovery cycle.

In this case, the Change Run Priority tootltip notifies: Your selection includes sets with different schedules, set order selection is limited to discovery cycle scheduled sets only

To change the run priority of Enforcement Sets

  1. In the table on the Enforcement Sets page, do one of the following:

    • To change the run priority of a single enforcement set: Hover over the row of an Enforcement Set, and then at the end of the row, from the 3-dot More Actions menu, click the ChangeRunPriorityAction action.

    • To change the run priority of one or more enforcement sets: Select the checkboxes of the Enforcement Sets that you want to change their run priority and then on the top right of the table, from the 3-dot More Actions menu, click the ChangeRunPriorityAction action.

    Make sure that the selected Enforcement Sets have Scheduling Type = Every global discovery cycle. The number of selected Enforcement Sets is displayed next to Total above the left side of the table (see screen below).

ActionsMenuChangeRunPriority

The Change Run Priority dialog opens with the current run priority selected. In the case that you selected Enforcement Sets of different run priorities, dialog opens with Multiple priorities selected, as in the screen below, where the selected Enforcement Sets have run priorities 5,4, and 5.

ChangeRunPriority

  1. In the Change Run Priority dialog, select from the dropdown, the new priority level, and then click Apply. The run priority of the selected Enforcement Sets is updated in the table.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.