Skip to main content

Dependencies

Dependencies let you control when a scheduled Job starts executing based on a prerequisite condition. A Folder can have an unlimited number of Dependencies.

Dependencies require the Job to be submitted to the Monitor (either manually or via a Trigger) before they are evaluated. A Dependency is a condition that needs to be satisfied before an Entry is released to start executing.

You may also create your own user-defined Dependencies through Precheck Jobs, which can be used to ensure a specific condition has been met before allowing the Job to run. These let you add the ability to handle any type of pre-processing needs.

Set a Dependency on a Job

You can add a Dependency on another Job that must have completed before this Job runs. The Job will remain in a waiting state until the Dependency has been met. You can also specify the required completion severity to ensure the dependent Job completed as expected.

A Depends on Job is required to set up this Dependency. The Since Job and Within Time properties are optional.

ConfigurationJAMS Scheduler Behavior
No Since Job or Since Severity is specifiedLook forward in time for a new completion of the Depends on Job that meets the specified Completion Severity.
Since Job is providedLook back in time as far as the last completion of the Since Job that meets the Since Severity.
Within Time is providedLook back in time as far as the specified period.
  1. Click Jobs from the main menu.
  2. Click a Folder.
  3. Do one of the following:
  • To set a Folder Dependency, click , and then select Properties.
  • To set a Job Dependency, click a Job, and then click Properties.
  1. Click Schedules.
  2. In the This Job depends on a section, click ADD.
  3. Select Job from the list.
  4. In the Depends on Job field, click BROWSE to select the Job that will be monitored.
  5. Click a Job and click Select.
  6. Optionally, select the Wait for All checkbox to wait for all instances of this dependency to complete before satisfying the Dependency.
  7. In the Completion Severity field, select the minimum severity for the Job selected in the Depends on Job field. The Job must meet or exceed this severity.
  8. Click Save. The Dependency is listed under the This Job depends on a section on the Schedule tab.

Job Dependency Properties

OptionDescription
NameEnter a name for this Dependency.
StatusDescription
EnabledSelect or clear the checkbox to enable or disable this Dependency.
SinceDescription
Since JobThis property specifies the Job to use to define how far back we look for the completion of the Depends On Job. Specifying this property is optional.
Since SeverityThis property specifies completion severity the Job specified in the Since Job field must have to satisfy the Dependency. The Job must meet or exceed this set severity. Specifying this property is optional.
Within TimeThis property specifies a delta time to define how recently the Depends On Job must have completed to satisfy the Dependency. Specifying this property is optional.
Depends OnDescription
Depends on JobThis property specifies the Job that will be monitored for the Dependency. The parent Job will wait for this Job to complete before it will run.
Wait For AllThis checkbox is used if there is more than one instance of the Depends on Job. Select the checkbox to wait for all of them to complete before satisfying the Dependency. Clear the checkbox to allow the Dependency to be satisfied if only one instance of the Depends on Job completes, if there are multiple instances.
Completion SeverityThis property specifies the completion severity the Depends on Job must meet or exceed to satisfy the Dependency.

Set a Dependency on a Job (date specific)

You can add a Dependency on another Job to have completed on a certain date/day. The Job will remain in a waiting state until the Dependency has been met on the specified day. You can also specify the required completion severity to ensure it completed as expected.

  1. Click Jobs from the main menu.
  2. Click a Folder.
  3. Do one of the following:
  • To set a Folder Dependency, click , and then select Properties.
  • To set a Job Dependency, click a Job, and then click Properties.
  1. Click Schedules.
  2. In the This Job depends on a section, click ADD.
  3. Select Job (date specific) from the list.
  4. In the Depends on Job field, click BROWSE to select the Job that will be monitored.
  5. Click a Job and click Select.
  6. Optionally, select the Wait For All checkbox to wait for all instances of the Job defined in this Dependency to complete before satisfying the dependency, if there are multiple instances of this Dependency.
  7. In the Completion Severity field, select the completion severity the Depends on Job must meet or exceed to satisfy the Dependency.
  8. In the Depend on Date field, select the date the Depends on Job must have been completed according to the Completion Severity property specified.
  9. Set any additional properties to control the Job as needed. See the table below.
  10. Click Save. The Dependency is listed under the This Job depends on a section on the Schedule tab.

Job Dependency Properties

OptionDescription
NameEnter a name for this Dependency.
StatusDescription
EnabledSelect or clear the checkbox to enable or disable this Dependency.
OverrideDescription
CalendarWhen a Calendar is listed, the Job will have access to the Date Types, such as holidays, in the Calendar.
Depends OnDescription
Depends On JobThis property specifies the Job that will be monitored for the Dependency. The parent Job will wait for this Job to complete before it will run.
Wait For AllThis checkbox is used if there is more than one instance of the Depends on Job. Select the checkbox to wait for all of them to complete before satisfying the Dependency. Clear the checkbox to allow the dependency to be satisfied if only one instance of the Depends on Job completes, if there are multiple instances.
Completion SeverityThis property specifies the completion severity the Depends on Job must meet or exceed to satisfy the Dependency.
Depends On DateThis property specifies a natural language date specification for the date that the Depends On Job must have completed on. It is the date used to evaluate this dependency. You can select a date from the drop-down menu or enter a value such as “First Monday of Month”.

Set a Dependency on a Precheck Job

You can set a Dependency on a Precheck Job, which lets you define any type of condition that a Job can be built to look for. A Precheck Job will be run automatically before the parent Job. This gives you additional flexibility beyond the built-in Dependency options. Any Job Definition can be specified. For example, you can have a Precheck Job to watch for a value in a database to change. Precheck Jobs can be written to loop internally until a condition is met. This avoids creating a new Entry each time the logical check is performed.

If the Precheck Job is successful, this Job will run. If the Precheck Job fails, it is submitted again based on the specified interval. This will continue until the Precheck Job is successful.

You can also use exit codes to control the response of the parent Job to the Precheck Job. See Precheck Job Exit Handling Methods for PowerShell for more information. In addition to these options, you can use the following exit codes with Jobs running on an SSHAgentX Agent:

  • 0 = Continue executing
  • 101 = Cancel the parent Job with a final severity of Success.
  • 102 = Cancel the parent Job with a final severity of Info.
  • 103 = Cancel the parent Job with a final severity of Warning.
  • 104 = Cancel the parent Job with a final severity of Error.
  • 105 = Try again

You can also use predefined Parameters with a Precheck Job that can be parsed within a Precheck Job. The Parameters can be used for retrieving details from the Parent Job. See Precheck Job Parameters for more information.

  1. Click Jobs from the main menu.
  2. Click a Folder.
  3. Do one of the following:
  • To set a Folder Dependency, click , and then select Properties.
  • To set a Job Dependency, click a Job, and then click Properties.
  1. Click Schedules.
  2. In the This Job depends on a section, click ADD.
  3. Select Precheck Job from the list.
  4. Under Precheck Job, click Browse.
  5. Go to the Job that you want to use as a Precheck Job. A list of Folders is displayed.
  6. Click SELECT.
  7. In the Precheck Interval field, enter the interval for running the Precheck Job.
  8. Click Save. The Dependency is listed under the This Job depends on a section on the Schedule tab.

Precheck Job Dependency Properties

OptionDescription
NameEnter a name for this Dependency.
StatusDescription
EnabledSelect or clear the checkbox to enable or disable this Dependency.
PrerequisiteDescription
Precheck JobThis property specifies a Job that must successfully executes before this Job is allowed to start.
Precheck IntervalThis property specifies the delay in seconds between executions of the Precheck Job if the Precheck Job fails. If the Job already has an internal loop, this option may not be used.

Set a Dependency on a File

You can set a File Dependency on a Job. This will prevent a Job from running until the specified file is present, absent, or available. Before you set the File Dependency, create a Credential that has access to the file. See Credentials for more information.

  1. Click Jobs from the main menu.
  2. Click a Folder.
  3. Do one of the following:
  • To set a Folder Dependency, click , and then select Properties.
  • To set a Job Dependency, click a Job, and then click Properties.
  1. Click Schedules.
  2. In the This Job depends on a section, click ADD.
  3. Select File from the list.
  4. In the Credentials field, select the Credential that has access to the file.
  5. In the File Name field, enter the name of the file.
  6. In the File Presence Option field, select the state of the file. You can select Present, Available, or Absent.
  7. In the Minimum Size field, enter the minimum size in bytes that is allowed for the file.
  8. In the Agent field, select that Agent that will be used to run the File Watch Job.
  9. Set any additional properties to control the Job as needed. See the table below.
  10. Click Save. The Dependency is listed under the This Job depends on a section on the Schedule tab.

File Dependency Properties

OptionDescription
NameEnter a name for this Dependency.
StatusDescription
EnabledSelect or clear the checkbox to enable or disable this Dependency.
File WatchDescription
CredentialsSelect a Credential for this Dependency. The Credentials must have access to the file location.
File NameThis property specifies the file to watch for. Wildcards are allowed.
File Presence OptionThis property specifies if the file must be present, absent, or available to satisfy the Dependency.
Minimum SizeThis property specifies a minimum acceptable size for the file.
AgentThis property specifies the Agent where the file watch will be performed.

Set a Dependency on a Variable

You can add a Dependency on a Variable. This is useful to ensure a Variable value is set properly before allowing a Job to run. A Job or process can set the value of the Variable for a downstream Job to evaluate based on a defined condition.

  1. Click Jobs from the main menu.
  2. Click a Folder.
  3. Do one of the following:
  • To set a Folder Dependency, click , and then select Properties.
  • To set a Job Dependency, click a Job, and then click Properties.
  1. Click Schedules.
  2. In the This Job depends on a section, click ADD.
  3. Select Variable from the list.
  4. In the Compare Condition field, select the type of comparison that will be used on the Variable.
  5. In the Compare Value field, enter a default value that will be used for the comparison.
  6. In the Variable field, select the Variable that will be monitored.
  7. Click Save. The Dependency is listed under the This Job depends on a section on the Schedule tab.

Variable Dependency Properties

OptionDescription
NameEnter a name for this Dependency.
StatusDescription
EnabledSelect or clear the checkbox to enable or disable this Dependency.
ConditionDescription
Compare ConditionThis property specifies the type of comparison that should be performed. The available options include less than, greater than, less than equal, greater than equal, false, or true.
Compare ValueThis property specifies the value used in the condition comparison.
ValueDescription
VariableThis property specifies JAMS Variable that contains the default value.

Set a Dependency on a Resource

You can add a Resource Dependency to a Job to prevent it from running until enough Resources from the Resource Pool in JAMS are available. This is used when setting up a maintenance window.

  1. Click Jobs from the main menu.
  2. Click a Folder.
  3. Do one of the following:
  • To set a Folder Dependency, click , and then select Properties.
  • To set a Job Dependency, click a Job, and then click Properties.
  1. Click Schedules.
  2. In the This Job depends on a section, click ADD.
  3. Select Resource from the list.
  4. In the Resource field, select the Resource for the Dependency.
  5. In the Quantity Required field, enter a quantity that is required to satisfy the Resource Dependency.
  6. Click Save.

Resource Dependency Properties

OptionDescription
NameEnter a name for this Dependency.
StatusDescription
EnabledSelect or clear the checkbox to enable or disable this Dependency.
ResourceDescription
ResourceThis property specifies the Resource that will be used for this Dependency.
Quantity RequiredThis property specifies the resource quantity that is required to satisfy the Dependency.

Set a Dependency on a Time Window

You can set a Dependency on a time window. This will allow a Job to run only within a specified range of time. You can use a Named Time or set your own date/time range in this Dependency. See Named Times for more information.

  1. Click Jobs from the main menu.
  2. Click a Folder.
  3. Do one of the following:
  • To set a Folder Dependency, click , and then select Properties.
  • To set a Job Dependency, click a Job, and then click Properties.
  1. Click Schedules.
  2. In the This Job depends on a section, click ADD.
  3. Select time window from the list.
  4. In the Name field, enter a name for this Dependency.
  5. In the Missed Window Action field, select an action for the Job when the time window is closed.
  6. Do one of the following:
  • In the Schedule Window field, select the Named Time.

  • Specify values for Schedule From Time and a Schedule To Time fields.

    note

    When using a Named Time on a time window, leave Schedule From Time and Schedule To Time blank.

  1. Click Save.

Time Window Dependency Properties

OptionDescription
NameEnter a name for this Dependency.
StatusDescription
EnabledSelect or clear the checkbox to enable or disable this Dependency.
ResourceDescription
Missed Window ActionThe action taken when the Schedule Window is missed. The following options are available:
  • No Action: If you manually or automatically submit a Job that has No Action selected, the Job will start based on the submitted time. If a Schedule window has been set and you manually submit the Job, a message will be displayed on the Submit dialog to display the current Schedule window time range. A No Action Job will run to completion, even if the Schedule window closes.
  • Continue: The Job does not start until the Schedule window opens and continues running to completion, even if the Schedule window closes. There is no rescheduling option.
  • Abort or Delete: The Job does not start until the Schedule window opens and is deleted or aborted if the window closes before the Job is completed.
  • Reschedule or Continue: The Job does not start until the Schedule window opens. If the Job does not start by the time the window closes, it is rescheduled for the next time the window opens. If the Job does start, this action allows the Job to continue to completion even if the window closes.
  • Restart and Reschedule: The Job does not start until the Schedule window opens. If the Job has not completed by the time the window closes, the Job is forced to abort and is rescheduled to run the next time the window opens.
Schedule From TimeThis property specifies the start of the scheduled time window for the Job.

NOTE: When using a Named Time on a time window, leave Schedule From Time and Schedule To Time blank.
Schedule To TimeThis property specifies the end of the scheduled time window for the Job.

NOTE: When using a Named Time on a time window, leave Schedule From Time and Schedule To Time blank.
Schedule WindowThis property specifies the Named Time that is a flexible window of time where Jobs may be scheduled to run.
NotifyDescription
Notify Event ClassSelect the event class that this event will generate when it occurs. You can select None, Normal, Low, Moderate, High, Urgent, or Critical.
Notify of Missed WindowSelect the checkbox to generate an event of the specified Notify Event Class if the Job has not started when the time window closes. Clear the checkbox to have the event generated if the Job has not completed when the time window closes.
Notify Only If Not StartedSelect the checkbox to set the Notify Event Class option if the Job has not started when the time window closes. Clear the checkbox to not set the Notify Event Class option if the Job has not completed when the time window closes.
LevelThis property specifies the level to be used by event handlers to classify events.
MessageEnter a message that will be passed to event handlers when this event is generated.