Scheduling Enforcement Set Runs
  • 19 May 2024
  • 11 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.
You can prioritize multiple Enforcement Sets that are scheduled to run at the same time every global discovery cycle, so that they run in the order of their assigned 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

  • Toggle on Set scheduling and set the parameters you want.
    • Repeat schedule run

      • Every global discovery cycle - Select this option to run the Enforcement Set 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 - Select this option to run the Enforcement Set every number of hours as defined in the Scheduled run every (hours) field.

        ECSchedule-hours-fix

        • The Enforcement Set run time is determined based on the specified value, starting from midnight. For example, if the specified value is 6, the run times are: 12am, 6am, 12pm, 6pm, 12am, etc.

        • The start time for the next Enforcement Set run is the closest interval. For example, If the specified value is 6, and the scheduling configuration was saved at 10 am, the next Enforcement Set run starts at 12 pm.

        • The maximum possible value is 24.

      • Every x days - Select this option to run the Enforcement Set every number of days as defined in the Scheduled run every (days) field.

        • The Every x days scheduling option starts counting x days from January 1st, meaning that from January 1st, the Enforcement Set runs every X days.
        • The start time for the next Enforcement Set run is the closest interval.

        ECSchedule-days.png

      • Days of week - Select this option to run the Enforcement Set on specific days of the 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 - Select this option to run the Enforcement Set on specific days of the 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 runs only on the days whose tile appears.

        ECSchedule-month.png

        • Scheduled run time - Select this option to run the Enforcement Set at a specific time. Click in the field and select a time from the list. The Enforcement Set runs 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 run. Note that the first Enforcement Set run is always on all assets matching the query.

      Every time an Enforcement Set is triggered to run, the following happens:

      1. The query defined in the Enforcement Set runs and returns a list of assets.
      2. The Enforcement Set runs against that list of assets.
      3. The list of assets is saved.

      When the Run on added entities only checkbox is selected, the list of assets returned in the query (from the second run onward) is compared to the previous run's asset list. Only assets that appear in the new list but were not in the previous list are included in this run.

      Example: An Enforcement Set is configured to run on query "devices with AD admin permissions" at the end of every discovery cycle and has the Run on added entities only checkbox selected.

      • At the end of the first discovery cycle (first run), the query returns assets A, B, and C. So the Enforcement Set runs on assets A, B and C.

      • At the end of the second discovery cycle (second run), the query returns assets B, C, and D. So the Enforcement Set runs only on asset D.

    • 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 runs only when the asset count is higher than the previous run. If this is the first run, the Enforcement Set runs on all assets that match the Enforcement Set query.

    • Only when assets have been removed since the last execution - The Enforcement Set runs only when the asset count is less than the previous run. If this is the first run, the Enforcement Set runs 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.

Note:

There is an OR relationship between all the above scheduling conditions, meaning that the Enforcement Set runs if even only one of the selected conditions exists.

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 20 (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 (1-20), 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 Change Run Priority action ChangeRunPriorityAction.

    • 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 Change Run Priority action ChangeRunPriorityAction.

    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).

ActionsMenuNewRunPriority

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 (1-20), and then click Apply. The run priority of the selected Enforcement Sets is updated in the table.

Managing Scheduling of Enforcement Sets

You can use the Manage Scheduling> Turn Scheduling On / Turn Scheduling Off action to turn on or off scheduling of one or more Enforcement Sets directly from the Enforcement Sets table.
When you turn off scheduling, the system saves the Scheduling settings so that if you later turn on scheduling, the Enforcement Sets will be configured once again with these settings.
ManageSchedulingActions

Note:
  • The Turn Scheduling Off action is disabled if all selected Enforcement Actions are configured with no scheduling.
  • The Turn Scheduling On action is disabled if all selected Enforcement Actions are configured with scheduling.
  • For a selection of Enforcement Actions - some with scheduling and some without, Turn Scheduling Off and Turn Scheduling On are both enabled. Clicking Turn Scheduling Off does not affect Enforcement Actions already configured without scheduling and Turn Scheduling On does not affect those with scheduling.

To turn on/off the scheduling of Enforcement Sets

  1. In the table on the Enforcement Sets page, hover over the row of an Enforcement Set or select the checkboxes of one or more Enforcement Sets, and then, from the 3-dot More Actions menu, click Manage Scheduling> Turn Scheduling On / Turn Scheduling Off .
    The number of selected Enforcement Sets is displayed next to Total above the left side of the table.

  2. In the confirmation dialog that opens, click Turn Scheduling Off / Turn Scheduling On.
    Scheduling is enabled/disabled for the selected Enforcement Sets. The Scheduling Type column in the table is updated accordingly.


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.