Scheduling Enforcement Set Runs
  • 09 Jul 2024
  • 14 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.

Scheduling the Enforcement Set Run

To schedule an Enforcement Set run

  1. In the Create Enforcement Set drawer, click the Select Schedule tab.

  2. Under the Select a Schedule Plan page that opens, click On. The Repeat schedule run dropdown opens for choosing the run schedule, and the Additional Conditions section is displayed, and can be expanded to choose more scheduling conditions.
    SelectSchedule1

  3. In the Repeat schedule run dropdown, select one of the following:

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

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

      • Select the Wait until cycle ends checkbox to run the Enforcement Set only after a Discovery Cycle in progress has completed. Learn more about the Wait until cycle ends option.

    • Every x days - Runs the Enforcement Set every number of days as defined in the Scheduled run every (days) field.
      RepeatEveryXDays

      • 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.
      • Select the Scheduled run time checkbox to run the Enforcement Set at a specific time in the selected days. Learn more about how to schedule the run time.
      • Select the Wait until cycle ends checkbox to run the Enforcement Set only after a Discovery Cycle in progress has completed. Learn more about the Wait until cycle ends option.
    • Days of week - Runs 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.
      RepeatDaysOfWeek

      • Select the Scheduled run time checkbox to run the Enforcement Set at a specific time in the selected days. Learn more about how to schedule the run time.
      • Select the Wait until cycle ends checkbox to run the Enforcement Set only after a Discovery Cycle in progress has completed. Learn more about the Wait until cycle ends option.
    • Days of month - Runs 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.
      RepeatDaysOfMonth

      • Select the Scheduled run time checkbox to run the Enforcement Set at a specific time in the selected days. Learn more about how to schedule the run time.
      • Select the Wait until cycle ends checkbox to run the Enforcement Set only after a Discovery Cycle in progress has completed. Learn more about the Wait until cycle ends option.

Scheduling the Run Hour

You can schedule the Enforcement Set run for a specific time by in the day by enabling the Scheduled run time option. Click in the field and select a time from the list. The Enforcement Set runs on the days selected 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

Scheduling the Run for the End of the Cycle

You can run the Enforcement Set only after a Discovery Cycle in progress has completed by enabling the Wait until cycle ends option. 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.

Configuring Additional Run Conditions

You can expand the Additional Conditions section, and select as many additional conditions for running the Enforcement Set, as required.

ScheduleAdditionalConditions

These additional conditions include the following:

Note:

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

Limiting Results

You can run the Enforcement Set on a limited number of assets resulting from the query:

  • The top N results.
  • Added entities since the last run.

To limit the run

  1. Under Limit Results, select either or both these options, as required:
    • Run on top N results only - Runs 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.

    • Run on added entities only - Runs 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.

Setting Triggering Conditions

You can define to trigger the Enforcement Set based on one or more of the following:

Checking the Number of Assets

You can select to trigger the Enforcement Set if the number of assets returned from the query is above a certain number, below a certain number, or in a range of numbers (select both options).

To run the Enforcement Set based on the number of assets returned from the query

  1. Under Number of Assets, select one or more of the following options:
    • If number of assets is above N - Type a number (N) in the text box. 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.
    • If number of assets is below N - Type a number (N) in the text box. The Enforcement Set runs only when the asset count is below this number.

Comparing to Last Run

You can select to trigger the Enforcement Set only if the number of assets returned from the query is more or less than the previous run.
To run the Enforcement Set based on the number of assets returned from the query compared to the last run

  1. Under Last Run Comparison, select one or more of the following options:
    • If assets have been added since the last execution - The Enforcement Set runs only if the asset count is higher than the previous run.
    • If assets have been removed since the last execution - The Enforcement Set runs only if the asset count is less than the previous run.
Note:

If this is the first run, even if you select one of these options, the Enforcement Set runs on all assets that match the Enforcement Set query.

Checking Adapter Connections

You can trigger the Enforcement Set to run only if the selected adapter connections successfully completed 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 another option (specific days or hours) AND the Wait until cycle ends option is enabled.

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

To run the Enforcement Set based on adapter connections with successful fetching

  1. Under Adapter Fetches, select the Only if the following adapter connections successfully completed option, and in the Select Connections dropdown, do one of the following:
    • Select an adapter. This selects all its adapter connections. In this case the adapter and all its connections are marked with a checkmark.
      AdapterFetchesSelectAdapter

    • Expand an adapter and select one or more of its adapter connections. In this case, the checkbox of the adapter is colored black, and the selected adapter connections are marked with a checkmark.
      AdapterFetchesSelectAdapterConnections

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.

    RepeatEveryXDays


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.