Restart Behavior
Restart behavior is used to react to the final status of a Job. You can control restart behavior on individual Job and Workflow Definitions, at the Partition level, and at the system level.
The priority for the different levels of restart behavior are evaluated in the following order. The first (most specific) restart behavior found is the one honored.
- Job or Workflow restart behavior
- Partition-level restart behavior
- System-level restart behavior
- Built-in default restart behavior
Restart Behavior for Job and Workflow Definitions
You can configure restart behavior on the JobStatus tab of a Job or Workflow Definition.
Partition-Level and System-Level Restart Behaviors
You can configure restart behavior on a system-wide basis and on a Partition-wide basis by manually creating special Job Definitions.
-
You can create a Job Definition for system-wide default settings named System_Defaults_System in the GLOBAL Partition.
-
You can create a Job Definition for Partition-level settings named System_Defaults_Partition in the Partition of the Queue of any Jobs or Workflow Definitions you want to specify restart behavior for.
The only properties that can be set on these special Job Definitions are:
- Job Definition > Description field: You can only set this when you create such a Job Definition.
- Job Status tab: This is where you configure restart behavior.
- Retention tab.
- Security tab.
Note: You cannot submit these Job Definitions, nor modify any other properties. Their sole purpose is to let you specify restart behavior settings.
System Level Restart Behavior
To create system-wide default restart behavior settings:
- Navigate to Configure > Automate > Scheduling Tools > Retention.
- Right-click an existing Object in the list and choose Create System_Defaults_System definition from the context menu.
- On the Job Definition tab, enter a description. Note that you can only do this when creating this Object.
- On the Job Status tab, set up your desired restart settings.
- Click Save & Close.
Partition Level Restart Behavior
To create Partition-level default restart behavior settings:
- Navigate to Configure > Automate > Job Definitions.
- Right-click an existing object in the list and choose Create System_Defaults_Partition definition from the context menu.
- On the Job Definition tab, follow this procedure:
- Choose the Partition you want to set default restart behavior for.
- Enter a Description. Note that you can only do this when creating this Object.
- On the Job Status tab, select your desired restart settings.
- Click Save & Close.
Example
Assume you want killed Jobs in the Finance Partition to be restartable on request. To accomplish this, create or edit the Partition-level Job Definition, then go to the Process Status tab and select Request Restart for the On Killed property.
Changing Job Definition Descriptions
If you want to change the Description of the System_Defaults_System Job Definition, navigate to Configure > Automate > Scripting tools > Shell and enter code like the following.
{
//Get the process definition
JobDefinition jDefinition = jcsSession.getJobDefinitionByName("System_Defaults_System");
//Set the description
jDefinition.setDescription("System-wide Restart Behavior");
jcsSession.persist();
}
You can do the same with the System_Defaults_Partition Job Definition.