Scope

  • Management of maintenance windows
  • Describes how to set up a maintenance window for job chains
  • FEATURE AVAILABILITY STARTING FROM RELEASE 1.9

Download & Deployment

  • Download the attached archive maintenance.zip
  • Unzip the archive to your JobScheduler $SCHEDULER_DATA\config\live directory
  • Download the attached archive maintenance_config.zip
  • Unzip the archive to your JobScheduler $SCHEDULER_DATA\config directory

Configuration

A maintenance window is defined by the following parameters:

ParameterDescriptionConfigured byDefault Value
down_froma datetime in the format yyyy-mm-dd hh:mm that specifies the beginning of the maintenance windowwill be set when creating the order for set_maintenance_window
down_toa datetime in the format yyyy-mm-dd hh:mm that specifies the end of the maintenance windowwill be set when creating the order for set_maintenance_window
folder

the name of the folder that a maintenance window is configured for.

folders can be configured as

  • a list of folder names separated by a comma
  • a list of folder names in a file

The folders have to be located below the folder specified by the root setting

will be set when creating the order for set_maintenance_window
source_filename of file containing a holiday configurationnever.xml |  always.xml
will be set when creating the order for set_maintenance_window

source_dirdirectory containing the file that is determined by the parameter source_fileJob: set_maintenance_window${SCHEDULER_DATA}/config
target_dirdirectory containing the file maintenance.xmlJob: set_maintenance_window${SCHEDULER_DATA}/config/live/\${folder}
rootthe root directory, below this directory all folders have to be located that are specified by the folder settingwill be set when creating the order for set_maintenance_window
recursivespecifies whether folders should be handled recursively, applicable values are true and falsewill be set when creating the order for set_maintenance_windowtrue
folder_regexonly folders that match this regular expression will be handled and only the folder name (not the full path) will be taken into consideration; this setting is optionalwill be set when creating the order for set_maintenance_window


The execution of an order in the job chain job_chain_create_maintenance_window will create two orders for the job chain set_maintenance_window:

  • one order for the start of the maintenance window
  • one order for the end of the maintenance window

These orders use the following parameters:

  • down_from
  • down_to
  • folder
  • source_file
  • root
  • folder_regex
  • recursive

When executing these orders an order for the job chain job_chain_copy_file will be created. This order will have all parameters from the original order and additionally the parameter target_dir will be set to the folder name of all handled folders (having applied the settings for folder_regex and recursive).

In the job chain job_chain_copy_file the job copy_file will be executed. This job copies the source file to the target directory. After the file is copied the configuration files for orders in the respective folder will be "touched" to force JobScheduler to reload the updated configuration.

  • At the time when the maintenance window starts the file name is set to never.xml.
  • At the time when the maintenance window ends the file name is set to always.xml.

Prerequisites

Existing Orders

Orders have to reference the file server/maintenance.xml in the holiday section of the run-time definition of the individual order. That means, that each planned order must include the live_file maintenance.xml. The file must be located in the job chain folder. To deploy the file to all folders, you can set up a maintenance window for the root directory recursicve. The start and stop the window manualy. The file maintenance.xml will be created then.

Example order file
<order  job_chain="job_chain1" id="daily_run">
    <run_time">
        <period  single_start="18:00"/>
        <holidays>
            <include  live_file="maintenance.xml"/>
        </holidays>
    </run_time>
</order>

Maintenance Window holiday files

The files never.xml and always.xml have to be located in the directory $SCHEDULER_DATA/config. The content of these files is as follows:

  • never.xml
     

    Maintenance Window holiday file: never.xml
    <holidays>
        <weekdays >
            <day  day="1 2 3 4 5 6 7"/>
        </weekdays>
    </holidays>
  • always.xml


    Maintenance Window holiday file: always.xml
      <holidays >  </holidays>
  • maintenance.xml: This file will be changed due to the execution. There will be a file per folder. maintenance.xml is a copy of always,xml or never.xml

Setting a Maintenance Window

  1. Navigate to the job chain maintenance/create_maintenance_window
  2. Open the order menue for the order set_maintenance
  3. Start the order parameterized
  4. Define the values for down_from, down_to, folder
  5. Submit the order

When the order has completed then two new orders will be created for the the job chain set_maintenance_window.

It is possible to define all maintenance windows in one configuration file. This file will be loaded by a job and according to the file contents, the orders for the job chain set_maintenance_window will be created.

Ending a Maintenance Window before the planned end

  1. Navigate to the job chain maintenance/set_maintenance_window
  2. locate the order .*_to_.* for the wanted maintenance window
  3. start the order
  4. delete the order

Starting a Maintenance Window before the planned start

  1. Navigate to the job chain maintenance/set_maintenance_window
  2. Locate the order .*_from_.* for the wanted maintenance window
  3. Start the order
  4. Delete the order

Disabling a planned Maintenance Window

  1. Navigate to the job chain maintenance/set_maintenance_window
  2. Locate the order for the planned maintenance window
  3. Delete the orders .*_to_.* and .*_from_.*