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:
Parameter | Description | Configured by | Default Value |
---|---|---|---|
down_from | a datetime in the format yyyy-mm-dd hh:mm that specifies the beginning of the maintenance window | will be set when creating the order for set_maintenance_window | |
down_to | a datetime in the format yyyy-mm-dd hh:mm that specifies the end of the maintenance window | will 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
The folders have to be located below the folder specified by the | will be set when creating the order for set_maintenance_window | |
source_file | name of file containing a holiday configuration | never.xml | always.xml will be set when creating the order for set_maintenance_window | |
source_dir | directory containing the file that is determined by the parameter source_file | Job: set_maintenance_window | ${SCHEDULER_DATA}/config |
target_dir | directory containing the file maintenance.xml | Job: set_maintenance_window | ${SCHEDULER_DATA}/config/live/\${folder} |
root | the root directory, below this directory all folders have to be located that are specified by the folder setting | will be set when creating the order for set_maintenance_window | |
recursive | specifies whether folders should be handled recursively, applicable values are true and false | will be set when creating the order for set_maintenance_window | true |
folder_regex | only 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 optional | will 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.
<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
- Navigate to the job chain
maintenance/create_maintenance_window
- Open the order menue for the order
set_maintenance
- Start the order parameterized
- Define the values for
down_from
,down_to
,folder
- 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
- Navigate to the job chain
maintenance/set_maintenance_window
- locate the order
.*_to_.*
for the wanted maintenance window - start the order
- delete the order
Starting a Maintenance Window before the planned start
- Navigate to the job chain
maintenance/set_maintenance_window
- Locate the order
.*_from_.*
for the wanted maintenance window - Start the order
- Delete the order
Disabling a planned Maintenance Window
- Navigate to the job chain
maintenance/set_maintenance_window
- Locate the order for the planned maintenance window
- Delete the orders
.*_to_.*
and.*_from_.*