Important

   

This space contains documentation for TrueSight Server Automation 8.9.03 and the later service packs for 8.9. For earlier releases, see BMC Server Automation 8.9.

Walkthrough: Defining a time period to block all job execution

In a production environment, you might have certain periods of time during the day, week, or month when the workload on your servers is high and you do not want to risk over-utilizing resources by running TrueSight Server Automation jobs. TrueSight Server Automation enables you to define time intervals called exclusion windows, when no TrueSight Server Automation jobs can execute on servers that you specify.

Before you begin

To define exclusion windows, your role must have authorizations from the ExclusionWindow family of authorizations. At minimum, the role must be assigned ExclusionWindow.Read, ExclusionWindow.Create, and ExclusionWindow.CreateACL. To assign target servers or server groups with exclusion windows, your role must also have the Server.read and ServerGroup.read authorizations. For a full list of authorizations, see System authorizations. For information about granting authorizations to roles, see Creating roles.

Step 1: (optional) Grouping servers in server groups or server smart groups

To simplify the task of assigning exclusion windows to a large number of servers, you can prepare server groups or server smart groups based on criteria that are relevant to your business needs.

Refer to the following pages for information about creating server groups or server smart groups:

Step 2: Defining the exclusion window and assigning it to servers

StepExample screen (click to enlarge)

In the Configuration menu, click Exclusion Window Management.

The Exclusion Window Management dialog box opens.

Click to add a new exclusion window.

This first panel in the wizard allows you to schedule the exclusion window so that it can run once or recur on a daily, weekly, or monthly basis.

Example: In the figure on the right, we have scheduled the exclusion window to take place during the busiest time of each week, when the servers have the heaviest workload — every Tuesday, Wednesday, and Thursday from 8:00 AM, India Standard Time (IST) for 5 hours (until 1:00 PM).

 Click here to expand detail steps for scheduling an exclusion window
  1. Enter a name for the exclusion window.
  2. Specify whether you want to schedule the exclusion window to occur once, daily, weekly, or monthly, as follows:
    • Once: One-time scheduling of the exclusion window. The On date field contains the date for the one-time schedule, in yyyy/mm/dd format. The At field contains the schedule time, in 24-hour clock format (00:00 to 23:59). 
    • Daily: Recurring daily schedule, for the exclusion window to run at a set time once a day. Enter the time in the At field, in 24-hour clock format (00:00 to 23:59).
    • Weekly: Recurring schedule based on days of the week. Enter a weekly interval in the Every field (for example, enter 3 if the exclusion window should occur every three weeks), and the execution time in the At field. For On the following days, select the days of the week when the exclusion window should execute. You can select multiple days. 
    • Monthly: Recurring schedule based on a day of the month. Enter the day of the month and the time of day for the exclusion window.
  3. Enter the time zone in which the exclusion window should run. For a recurring schedule, TrueSight Server Automation automatically accounts for differences in time zones and changes in daylight savings time. For example, if you schedule an exclusion window that should run weekly at 06:00 Eastern Standard Time, the exclusion window always runs at 06:00 Eastern Time, no matter whether standard or daylight savings time is in effect.
  4. Enter the time (in minutes) for which you want the exclusion window to run after it begins.

Tip

To avoid scheduling the exclusion window at a time that conflicts with other exclusion windows or maintenance windows, you can generate a CSV file with details of all defined time windows. You can consult this CSV file whenever you schedule a new window. See Exporting details of time windows.

Click Next.

On the Targets panel, select the servers to which you want to assign the exclusion window.

Use the button to move a server, server group, or server smart group from the Available Servers box on the left to the Selected Servers box on the right. Note that when you move a server group or a smart server group by clicking , all the server that are part of the server group or server smart group at that particular time are added to the Selected Servers box.

 Click here to expand detail steps on how to use the UI elements on this screen
  1. From Available Servers, specify the operating system of the servers you want to select. To display servers running any operating system, select All.
  2. Select servers from a tree or sortable list by doing one of the following:
    • Click By Group at the bottom of the window. The left panel displays servers in a hierarchical list arranged by server group. Choose servers by doing one of the following:
      • Click a server group to select all servers within the group.
      • Click one or more servers, if necessary expanding server groups.
    • Click By Name at the bottom of the window. The left panel lists servers by name in a Group Explorer view. Sort servers in ascending or descending order by clicking on any column header. Click one or more servers. If you select a server group, the exclusion window runs against the servers assigned to that group at the time of execution. The servers assigned to smart groups can change dynamically based on their server properties. You can modify static server groups manually by adding or removing servers.
  3. Click the right arrow to move your selections to the right panel. To remove a server from the list on the right, select it and click the left arrow. To remove all servers from the list on the right, click the double left arrow.

Click Finish.

Note

If you want to control access to the exclusion window using ACLs,  click Next to move on to the Permissions panel.

For more information about the UI elements on the Permissions panel, see Import Servers - Permissions.

For more information about ACL policies, see Controlling server access with agent ACLs.

Click to add more exclusion windows or click Close to exit.

Note

You can assign more than one exclusion window to the same server.

Management of exclusion windows includes the following additional options:

  • To edit an exclusion window, use the Edit Exclusion Window icon.
    The same settings (that are displayed when you create a new exclusion window) are displayed on 3 tabs.
  • To delete an exclusion window, use the Remove Exclusion Window icon.

If you add, edit, or delete an exclusion window while jobs are running, the jobs will continue running or stop running according to the exclusion window definitions that existed when job execution started.

See also Deactivating and activating an exclusion window.

Any TrueSight Server Automation job that attempts to execute during the exclusion window will fail on all servers associated with the exclusion window. An error message in the job log notifies you that the server was configured to be in an exclusion window when the job was run.

Note

The exclusion window also blocks automatic component discovery for Snapshot Jobs and Compliance Jobs (as controlled by the Run auto-discovery option in a Snapshot Job or Compliance Job). In such a case, if no components were available (from a previous discovery) for a server included in the exclusion window, the server does not appear in job results. In addition, a warning message in the job log notifies you that the server was configured to be in an exclusion window when the job was run.

If a job started running before the beginning of an exclusion window and is still running when the exclusion window begins, job behavior depends on the type of job:

Job typeBehavior at beginning of exclusion window

All types except for Advanced Deploy Job on a Windows server

The job is allowed to complete, because it started before the beginning of the exclusion window.
Advanced Deploy Job on a Windows server

By default, the job is paused. When the exclusion window ends, you can rerun the job, and it will resume from where it left off (for example, a Deploy Job will continue with the next item in a BLPackage).

You can choose to allow the job to complete, instead of pausing. To control this behavior in a specific Advanced Deploy Job, adjust the Maintenance and Exclusion Window options in the Phases and Schedules settings of the job.

Note

  • For jobs created before upgrading to TrueSight Server Automation 8.9, the option to pause the job is not selected by default.
  • This option is only available on targets that are running an RSCD Agent of version 8.9 or later.
  • For this option to work properly, ensure that the Advanced Deploy Job was set with the following job options:
    • Flow Control is set to By server.
    • The Reset job on failure option is not selected.

If less than a minute remains before the beginning of the exclusion window, the job is not allowed to start.

Note

If an exclusion window overlaps the scheduling definitions of a maintenance window on any specific server, the exclusion window takes precedence, and the maintenance window does not take effect.

GUI operations are not blocked by the exclusion window. For example:

  • Certain operations that are performed by TrueSight Server Automation jobs can be performed by alternative methods through the GUI. The exclusion window blocks job execution, but does not block you from performing the operation through the GUI. For example, an ACL Push Job will not run during the exclusion window, but you can push ACLs manually through the GUI. Similarly, you cannot run a Network Shell Script Job, but you can run NSH commands manually.
  • Even GUI operations that involve communication with target servers (such as displaying server information in Live Browse or Active Node view) are allowed during an exclusion window.

NSH Script Jobs of Type 2 and Type 4 are not blocked by exclusion windows, as these jobs do not involve direct communication with a list of servers.

Deactivating and activating an exclusion window

You can temporarily deactivate and subsequently re-activate any defined exclusion window.

StepExample screen (click to enlarge)

In the Exclusion Window Management dialog box, select the exclusion window that you want to temporarily deactivate, and click Deactivate Window .
Then click Yes in the confirmation message.

The status icon in the Name column changes from green  to red .

When you are ready to reactivate the exclusion window, select it in the list, and click Activate Window .
Then click Yes in the confirmation message. 

The status icon in the Name column changes from red to green .

Grouping all servers associated with a specific exclusion window

You can use a server property to create a smart group that groups together all servers associated with a specific exclusion window. Such a smart group will later be useful when you need to select servers, especially when selecting targets for a job.

StepExample screen (click to enlarge)

In the Servers folder, select the location where you want to create the smart group, right-click, and select New > Server Smart Group.

The New Server Smart Group dialog box opens to the General panel.

 
For Name, enter a name for the smart group. In this example, we call the smart group No jobs during weekly high workload. Optionally, enter a description. 

In the bottom half of the dialog, there is a row that represents a rule for smart group membership. Using that row, take the following actions:

  1. Leave the first drop-down list alone. It should say Server.
  2. In the next drop-down list, click Select Property . A list appears. Scroll down and select EXCLUSION_WINDOW*.
  3. Leave the next drop-down list alone. It should say equals.
  4. In the next drop-down list, select the name of the exclusion window (in this example, Weekly high workload).
  5. Click Apply changes. The criteria appears in text form rather than a series of drop-down lists.

Note

You can alternatively choose the does not equal operator instead of the equals operator, to group together servers from multiple exclusion windows (all exclusion windows except for the specified one). In such a smart group, a server that is associated with multiple windows might appear multiple times (due to a known issue); you can ignore the redundant appearances of the same server.

Click Finish. The new smart group appears under the Servers folder. If you expand it, the smart group shows all servers associated with the specified exclusion window. 

Exporting details of time windows

To help you keep track of all the defined time windows (both exclusion windows and maintenance windows) and to figure out which servers are associated with which window, you can export the basic definitions and properties of defined maintenance windows and exclusion windows to a CSV file.

StepExample screen (click to enlarge)

For details of time windows associated with all servers, right-click the Servers folder and select Export Exclusion/Maintenance Windows.

For details of time windows associated with a specific group of servers, right-click the server group or server smart group and select Export Exclusion/Maintenance Windows.

In the Export dialog box, provide the following input:

  • Specify a location to store the exported time window details.
  • For Object Name, provide a file name.
  • For Object Type, ensure that .csv is specified.
  • For File encoding, select the type of character encoding to use for the exported file.

Then click Save.

Was this page helpful? Yes No Submitting... Thank you

Comments