Life Cycle of a Job instance
Each TA job instance has its own life cycle in the production schedule. The job’s current status indicates where it is in its life cycle. A typical life cycle is one where the job:
-
Waits in the production schedule for its dependencies to be met.
-
Enters a queue and waits for an execution slot to become available.
-
Launches on its designated agent.
-
Starts execution successfully on its designated agent.
-
Completes normally.
Each phase corresponds to the statuses Waiting On Dependencies, Waiting On Resource, Launched, Active and Completed Normally, respectively. Other statuses are also possible depending on certain conditions and exceptions.
Note: For more information on error job conditions, see Monitoring Production.
Job and Job Group Statuses
This table describes the different job statuses that TA can assign to a job or job group:
Status |
Job Description |
Job Group Description |
---|---|---|
Aborted |
The job was aborted and cannot be resumed. A job can be aborted if it is Active or Stopped status |
Not applicable |
Active |
The job is running |
At least one job in the group is active. If no jobs in the group are active and there are still jobs in the group that need to run, the status will be Waiting on Children |
Agent Disabled |
The agent where the job is supposed to run is not enabled, and the job cannot run. If a job is using an agent list, all agents in the agent list have been disabled. To allow the job to run, select an alternative agent override or enable the agent from the agent’s Connection Definition dialog (Connections pane) |
Not applicable |
Agent Outage |
The agent connection where the job is to run does not run during the scheduled outage. The job runs on the agent after the lapse of the outage period |
Not applicable |
Agent Unavailable |
The agent where the job is to run is not connected or is not running. If the job is using an agent list, all agents in the list are unavailable. To get the job to run on the agent, determine why the agent is not available and correct the problem. For information about making an agent available, see Starting and Stopping TAComponents |
Not applicable |
Cancelled |
The job is cancelled by an operator and cannot be resumed. A job can be cancelled while it is waiting in the production schedule (Waiting On Dependencies status) or in a queue (Waiting On Resources status) |
The job group is cancelled by an operator and cannot be resumed. Jobs in the group that were waiting were also cancelled. Jobs in the group that were active were aborted, if possible |
Cancel Pending |
The job is cancelled but its dependencies are released to run to completion. Once the dependencies are satisfied, the job status changes to Cancelled Normally. If any of the dependencies do not complete, the job remains in the Cancel Pending status. This status only occurs from a user-initiated job control action or a job action |
The job group is cancelled but all of the dependencies placed on its child jobs are released. In essence, this status is like the Waiting on Dependencies status. Once the dependencies are satisfied, the jobs go to the Cancelled Normally status. If any of the dependencies are not fulfilled, the job group remains in the Cancel Pending status |
Cancelled Normally |
A job that was in the Cancel Pending status ends in the Cancelled Normally status once the job’s dependencies are fulfilled. The job is considered to have completed normally |
Any job in a job group that ends with a Cancelled Normally status is treated as if the job completed normally |
Completed Abnormally |
The job completed with a non zero exit code indicating abnormal operation |
All jobs in the group ran and at least one job in the group completed abnormally |
Completed Abnormally (output pending) |
The job has completed abnormally but the job output is still being gathered and is not yet available |
The job group remains in Active status until the output is posted |
Completed Normally |
The job completed normally with an exit code of 0 |
All jobs in the group completed normally |
Completed Normally (output pending) |
The job has completed normally but the job output is still being gathered and is not yet available |
The job group remains in Active status until the output is posted |
Deferred |
Another instance of this job was running when this instance was ready to launch, and the concurrency option for the job was set to Defer. This job instance will run after the previous instance completes |
Another instance of this job group was running when this instance was ready to launch, and the concurrency option for the job group was set to Defer. This job group instance will run after the previous instance completes |
Error Occurred |
An error occurred when launching the job and it did not run. There is no exit code. The specific error can be viewed in the TA logs and will show in the Job Details dialog. For more information about logs, see Monitoring Production |
An error occurred for at least one job in the group. If another job has a Completed Abnormally status, the Error Occurred status will still be set at the group level |
Externally Defined |
The job completion status is defined manually, and has not been set yet |
Not applicable |
Externally Defined (output pending) |
The job status was determined by an external user or program and the job output is still being gathered and is not yet available |
Not applicable |
Held |
The job is restricted from running by an operator or an action. A job can be held up until the time it becomes active |
All active jobs in the group have stopped, and all waiting jobs have been held |
Launched |
A request to launch the job has been sent to the agent, and is pending notification from the agent that the job has started executing. This state is between Waiting On Resource and Active |
Not applicable |
Orphaned |
The agent on which the job was running is no longer in communication with the TA Master. The Master does not know its final status. The agent, network, or the Master may be down |
A group may have an Orphaned status based on its children. |
Scheduled |
This is the initial status of a job when it is added to the schedule. If it is scheduled to run today, the job will enter either the Waiting On Resource, Waiting On Operator, or Waiting On Dependencies status, depending on the job’s properties. Otherwise, it will stay in the Scheduled status. A job also temporarily enters this status when it is released by the operator |
This is the initial status of a group when it is added to the schedule. If it is scheduled to run today, the group will enter either the Waiting On Resource, Waiting On Operator, Waiting On Children or Waiting On Dependencies status, depending on the group’s properties. Otherwise, it will stay in the Scheduled status. A group also temporarily enters this status when it is released by the operator. |
Skipped |
Another instance of this job was running when this instance was ready to launch, and the concurrency option for the job is set to Skip. This job instance will never run |
Another instance of this job group was running when this instance was ready to launch, and the concurrency option for the job group is set to Skip. This job group instance will never run |
Stopped |
Execution of the job has been suspended. A job can enter Stopped status only when it was previously Active. |
See Held |
Terminate Waiting |
Not applicable |
A job group is in the process of terminating but is waiting on dependencies. This is because the group has a child that ignored the terminate request, and the group must satisfy its dependencies before allowing its children to run |
Terminate Ready |
Not applicable |
A job group is in the process of terminating but is waiting on resources that it requires. This is because the group has a child that ignored the terminate request, and the group must lock its resources before allowing its children to run |
Terminated |
The job is Terminated by an operator on receiving a terminate request and cannot be resumed. A job can be Terminated while it is waiting in the production schedule (Waiting On Dependencies status) or in a queue (Waiting On Resources status) |
A group will only be Terminated if all of its children are Terminated |
Terminating |
Not applicable |
The job group in a waiting state changes to the Terminating status and sends a terminate request to its children |
Timed Out For Day |
The job missed its time window today. An attempt will be made to run the job tomorrow. A job cannot time out when it is in a queue (Waiting On Resources) or when it is Active |
The group instance has timed out for the day |
Timed Out |
The job missed its date and time window. No attempt will be made to run the job tomorrow. A job cannot time out when it is in a queue (Waiting On Resources) or when it is Active |
The group instance has timed out |
Unrecoverable |
A job that cannot be recovered or the TA Master has lost track of |
A group may have an Unrecoverable status based on its children |
Waiting On Children |
Not applicable |
The group is waiting for its children’s dependencies to be met |
Active Waiting On Children |
Not applicable |
The group with resource requirements is waiting for its children’s dependencies to be met |
Waiting On Dependencies |
The job is scheduled and it is waiting on job, file or variable dependencies to be met in order to run |
The job is scheduled and it is waiting on job, file or variable dependencies to be met in order to run |
Waiting On Operator |
All the job’s dependencies are met, and it is waiting for the operator to release it |
All the group’s dependencies are met, and it is waiting for the operator to release it before its children can run |
Waiting On Group |
The job’s parent group is waiting for operator release |
The group’s parent group is waiting on operator release |
Job Group and Child Job Statuses
The status of a job group is determined by its children.
This table demonstrates the order of precedence and correlation between the status of a group and the status of its children:
Note: For more information on a particular status, see the table Job and JobGroup Statuses.
Note: The final status of a job group is determined by the statuses of all of its children, whether the child job ran on the current day or started on another day as a carryover job. This means if a child job that started on the previous day completed abnormally and other child jobs ran on the current day and completed normally, the job group is considered to have completed abnormally.
Status |
Priority |
---|---|
Active |
The parent group status is set to the Active status, if any child is in the Active or Launched status |
Waiting on Children |
The parent group is set to the Waiting on Children status, if:
|
Active Waiting on Children |
The parent group with resource requirements is set to the Active Waiting on Children status, if:
|
Completed Abnormally |
The parent group status is set to the Completed Abnormally status, if:
|
Orphaned |
The parent group status is set to the Orphaned status, if:
|
Unrecoverable |
The parent group status is set to the Unrecoverable status, if:
|
Timed Out |
The parent group status is set to the Timed Out status, if:
|
Cancelled |
The parent group is set to the Cancelled status, if:
|
Externally Defined |
The parent group is set to the Externally Defined status, if:
|
Normal |
The parent group is set to the Normal status, if no child is in the Active, Waiting on Children, Error Occurred, Completed Abnormally, Orphaned, Unrecoverable, Timed Out, Cancelled, or Externally Defined status. A parent group with the Normal status can include children with the Cancelled Normally, Scheduled, Skipped, Deferred, and Completed Normally statuses |
Cancelled Normally |
The parent group is set to the Normal status, if no child is in the Active, Waiting on Children, Error Occurred, Completed Abnormally, Orphaned, Unrecoverable, Active, Waiting on Children, Error Occurred, Completed Abnormally, Externally Defined, or Normal status. A parent group with the Cancelled Normally status can include children with the Scheduled, Skipped, Deferred, and Completed Normally status |
Job Group Inheritance
TA lets jobs inherit properties from its parent job group. When you create a job group and add a job, key properties of the job will default to its parent group’s properties. You can then save time by changing only the individual job properties needed for each job.
Example: Let’s say you have a job group called Payroll Jobs containing four jobs: one job collects wage data, one job formats the data into a management report, one job finalizes and registers the data in the payroll database and one job prints payroll checks. Since these jobs are similar, they can inherit many properties of the parent job group, Payroll Jobs, such as on which days to run and on what machine. All you need to do is specify each command to run, and their dependencies on each other. For example, Job 2 depends on the completion of Job 1, and Job 3 depends on the completion of Job 2, etc. Thus, by using inheritance, you save the time it takes to specify job data common between the jobs.
Note: If a job is assigned a calendar that conflicts with its parent group's calendar, and the Inherited option on the Run tab is not selected, that job will NOT run.
Note: The system-wide SLAs defined at the Job Group level will not be inherited to child jobs.
Jobs can inherit a particular set of group properties. Not all properties are inherited.
This table shows which job properties can be inherited from the group:
Property |
Inheritable |
Comments |
---|---|---|
Common Properties |
||
Job Name |
No |
Every job must have a unique name |
Job Class |
Yes |
A job will inherit the job class of its parent group |
Owner |
Yes |
A job will have the same owner as the group unless the Owner field in the Job Definition dialog is changed manually |
Parent Group |
N/A |
This is the parent group from which the job inherits its properties |
Enabled |
Yes |
If the group is enabled, the child jobs will be enabled. the parent group is disabled, the child jobs will also be disabled |
Program Tab Properties |
||
Command |
No |
A group definition does not include a command |
Command Parameters |
No |
A group definition does not include parameters |
Environment File Name |
No |
A group definition does not include an environment file |
No Inheritance |
|
A group definition is not inherited |
Output File Name |
No |
A group does not create output |
Working Directory |
|
A directory is specified for a program or script to run in |
Schedule Tab Properties |
||
Calendar settings |
Yes |
All jobs can run on the same dates |
Time Window settings |
Yes |
All jobs can run in the same range |
Repeat settings |
No |
These values are implicitly, not directly, inheritable. If the group runs 5 times in one day, so will the job. However, the job isn’t set to run 5 times automatically within the group. This would cause the job to run 25 times (5 times per each group run) in one day |
Run Tab Properties |
||
Agent Information settings |
Yes |
All jobs can run on the group’s agent or agent list |
Agent Name |
Yes |
All jobs can use the group’s agent |
Agent List |
Yes |
All jobs can use the group’s agent list |
Runtime User |
Yes |
All jobs can use the group’s runtime user |
Tracking settings |
Yes |
Tracking is specific to each job |
Duration (in minutes) settings |
No |
Job runtime is specific to each job. Groups can have their own duration which is a combination of all its child jobs |
Dependencies Tab Properties |
||
Dependencies/Type |
No |
This is implicit. If a group’s dependencies are met, all its child jobs can start. However, the group holds the dependency, not the child jobs |
All must be met |
No |
This is implicit |
At least one must be met |
No |
This is implicit |
Resources Tab Properties |
||
Resources |
No |
Resources can be assigned to individual jobs and job groups |
Job Events Tab Properties |
||
Job Events/Event Triggers |
No |
Job events are specific to each job and group, with exception of events applying to All Jobs |
Options Tab Properties |
||
Job Alias |
No |
The job alias is specific to the job |
Job Priority |
No |
Job priority is specific to jobs |
If job is currently running |
No |
Concurrency is specific to jobs |
Save Output Option |
No |
Not available from group |
Allow Unscheduled |
No |
You must set this for each job (default is checked) |
Require Operator Release |
No |
You must set this for each job (default is not required) |
History Retention (in days) |
No |
History data is specific to each job |
Base time needed to run job on |
No |
Sets the default basis for evaluating whether jobs will complete before a scheduled outage |
Allow operator rerun |
No |
Allows the operator to rerun a job |
Disable Carryover |
No |
Any job from the current production schedule that is not in an Active or a Launched status when the next production day starts, will not be carried over to the next production day |
For UNIX, sourceuser’s profile |
No |
Provides for the execution of all variables in a UNIX user’s profile |
Run Book Tab Properties |
||
Operator Instructions |
No |
Each job has its own operator instruction (optional) |
Notes Tab Properties |
||
Other Notes |
No |
Each job has its own description (optional) |
History Tab Properties |
||
All properties |
No |
History data is specific to each job or group |
Enabled |
Yes |
If the group is enabled, the child jobs will be enabled. the parent group is disabled, the child jobs will also be disabled |
Program Tab Properties |
||
Command |
No |
A group definition does not include a command |
Command Parameters |
No |
A group definition does not include parameters |
Environment File Name |
No |
A group definition does not include an environment file |
No Inheritance |
|
A group definition is not inherited |
Output File Name |
No |
A group does not create output |
Working Directory |
|
A directory is specified for a program or script to run in |
Schedule Tab Properties |
||
Calendar settings |
Yes |
All jobs can run on the same dates |
Time Window settings |
Yes |
All jobs can run in the same range |
Repeat settings |
No |
These values are implicitly, not directly, inheritable. If the group runs 5 times in one day, so will the job. However, the job isn’t set to run 5 times automatically within the group. This would cause the job to run 25 times (5 times per each group run) in one day |
Run Tab Properties |
||
Agent Information settings |
Yes |
All jobs can run on the group’s agent or agent list |
Agent Name |
Yes |
All jobs can use the group’s agent |
Agent List |
Yes |
All jobs can use the group’s agent list |
Runtime User |
Yes |
All jobs can use the group’s runtime user |
Tracking settings |
Yes |
Tracking is specific to each job |
Duration (in minutes) settings |
No |
Job runtime is specific to each job. Groups can have their own duration which is a combination of all its child jobs |
Dependencies Tab Properties |
||
Dependencies/Type |
No |
This is implicit. If a group’s dependencies are met, all its child jobs can start. However, the group holds the dependency, not the child jobs |
All must be met |
No |
This is implicit |
At least one must be met |
No |
This is implicit |
Resources Tab Properties |
||
Resources |
No |
Resources can be assigned to individual jobs and job groups |
Job Events Tab Properties |
||
Job Events/Event Triggers |
No |
Job events are specific to each job and group, with exception of events applying to All Jobs |
Options Tab Properties |
||
Job Alias |
No |
The job alias is specific to the job |
Job Priority |
No |
Job priority is specific to jobs |
If job is currently running |
No |
Concurrency is specific to jobs |
Save Output Option |
No |
Not available from group |
Allow Unscheduled |
No |
You must set this for each job (default is checked) |
Require Operator Release |
No |
You must set this for each job (default is not required) |
Environment Files
TA allows you to make environment variables available to each job that you launch by entering the name of an environment file in the Job Definition dialog. For more information, see Job/Job Group Definition Dialog. The file should be a plain text file and can have any name, as long as the correct path to the file is entered in the Environment File field of the Job Definition dialog. No commands are allowed in the file, only variable designations.
All environment variables are specified in the environment file in this format: VARIABLE=value.
Example: TZ=PST8PDT
Note: Do not leave any space between the variable and its value. If you leave spaces, the variables will not be read correctly.
Environment Variables
The table lists available environment variables that you can use in your environment file:
Variable |
Description |
---|---|
HOME |
The home directory of the runtime user |
OCS |
The path to TA |
OCSJNUM |
The job ID number |
OCSJNAME |
The name of the job |
OCSFJNAME |
The full name of the job |
OCSJUSER |
The owner of the job |
OCSJEUSER |
The runtime user |
OCSJHOST |
The host on which the job was scheduled |
OCSJEHOST |
The runtime host where the job is running |
OCSECODE |
Exit code of the job |
Adding Jobs to the Production Schedule
Adding a Job or Job Group to the Schedule
Jobs and job groups are added to the production schedule in various ways.
Method 1
After defining a job or job group, click OK in the definition dialog.
If you assigned a calendar, the Effective Date dialog displays, under certain conditions as explained below.
Note: The Effective Date dialog displays when first adding a job to the schedule or when modifying certain job parameters that affect how the job runs. Changing a job’s command, calendar or agent parameter displays the Effective Date dialog while changing the owner, job class or notes of the job does not.
If you did not assign a calendar, a dialog displays a message that the job can only be added manually to the production schedule.
The Effective Date dialog is only displayed when accepting scheduled jobs whose next scheduled calendar date falls within the production schedule range and only when the Master is running.
Example: If the current production date range is 12/10 to 12/20, and the next calendar date to run the job is 12/30, the Effective Date dialog will NOT appear. However, the job will be added to the schedule automatically on 12/30 through the automatic compile feature.
You can choose the day that the first instance of the job should run by selecting from the Scheduled Dates list when the Effective Date dialog displays. The Scheduled Dates list only includes dates that are currently in the production schedule and match the job’s calendar.
Any changes made to a job definition do not apply to the current production schedule if the job has already run, even if the current date is selected in the Effective Date dialog. These examples help illustrate the circumstances where modifications to a job definition do not apply to the current production schedule:
-
If the job being saved has already started to run (any status other than Scheduled, Waiting on Dependencies or Waiting on Resources) or the job has completed.
-
If the job being saved is a repeating job and has already run once.
-
If the job being saved belongs to a job group where any of the other jobs of that job group have already started to run or have completed.
-
If the job being saved belongs to a job group where any of the other jobs inside that job group are a repeating job and have already run once.
-
In these circumstances, to make the modified job definition run in the current day, you should use the Insert Job into Schedule option. Be aware that inserting the job manually will give the job a higher job instance number which may affect job dependencies within other job definitions.
-
If a job or job group repeats a specified number of times or if a job group contains jobs that repeat, the Start today’s repeating job(s) now option will appear in the Effective Date dialog. Selecting this option will create the first repeating instance now; otherwise, the instances will start at the beginning of the job’s time window. If you do not select this option, your job or group will enter the schedule on the date shown in the Effective Date dialog. If no time window is specified, it is assumed to be 12:00:00 AM to 11:59:59 PM. This may result in partial or even no scheduled instances of repeating jobs or groups if the current time is past the last repeat of the job.
If the Master starts after the job has been created, the job will only enter the schedule on demand through the Effective Date dialog for the day or the next eligible day that is compiled.
If you submit a child job through the Effective Date dialog and the parent group is not in the production schedule, the parent group is automatically added as well.
Method 2
Right-click a job or job group in the Jobs pane or the Job Activity pane and click Insert Into Schedule from the context menu. Or, select a job or job group, then select Insert Into Schedule from the Activities menu. The Insert Into Schedule dialog displays.
Note: The first selected job is the default for the Insert Into Schedule dialog. You can use this selection or select a different job using the Job Search dialog as explained in the Job Search dialog section.
Insert Into Schedule inserts one instance of the selected job or job group into the production schedule to run today, including its dependency criteria.
The job or job group must have the Unscheduled allowed option selected in its definition before the Insert Into Schedule method is available.
When a job group is selected to Insert Into Schedule, all of its members are also inserted. Only one instance will be added, even if the job or job group is defined to repeat during the day.
-
If a child job is added using Insert Into Schedule, the job will not have a parent group in the production schedule. If the parent already exists in the schedule, the Insert Into Schedule method will not associate the child job with it and will not reflect its duration and status. If the parent does not already exist in the production schedule, the Insert Into Schedule method will not include it.
-
If the job or job group already exists, a new instance will appear in the schedule, followed by a sequence number in parentheses, e.g., Job A (2).
Method 3
Click Create Schedule from the Activities menu.
The Create Schedule method deletes all instances in the production schedule for the dates you specify, and recreates the schedule with qualifying jobs as determined by the rules defined in the Job Definitions pane. All completed, active and previously scheduled jobs are removed. Extreme caution should be used with this method to prevent the inadvertent deletion of critical jobs.
Jobs that are not enabled, do not have associated calendars, or whose time windows have passed are not included in the production schedule when you use the Create Schedule method. Also, all jobs that were added to the production schedule manually for the selected day(s) are lost and must be re-inserted.
If you select the Start today’s repeating Job(s) now option with the Create Schedule method, the first instance of a repeating job will be the current time. Otherwise, they start according to their time window. If no time window is specified, it is assumed to be 12:00:00 AM to 11:59:59 PM. This may result in partial or no scheduled instances of repeating jobs or groups if the current time is past the last repeat of the job.
Method 4
The Master compiles automatically at midnight.
At midnight, a new day is automatically added to the end of the current production schedule (determined by the configuration of how many future days to include). Whether the new day compiled is “tomorrow” depends on your configuration of Future Days to Include in Schedule. For more information on compilation options, see Getting Started. Qualifying jobs are added for the new day and the oldest day of history is removed.
Note: The parameters for compilation are determined by your job and job group definitions and System Configuration settings. For more information on automatic compilation, see Defining Jobs Interface.
Method 5
The Master automatically inserts a job into the schedule by a system or job event (new job action).
The new job action method is discussed in Actions and Alerts. The operation of this method is similar to using Insert Into Schedule, as described for Method 2.
Modifying a Job Occurrence in the Production Schedule
These are the ways to modify the properties of an existing job instance:
-
Change any of the original job’s properties except its name and TA will purge and replace job instances with the new property data.
Jobs that have not run and whose properties were changed are replaced with the new instances of the job when they re-enter the schedule. If the job’s Enabled option or calendar is removed, the job will be deleted and not replaced. Changes do not affect jobs that are rerun.
-
Double-click a job in the Job Activity pane or right-click and select Details from the context menu to display the Job Details dialog.
Use the Job Details dialog to override the Agent or Agent List, Queue, Job Priority, Command, Environment file or Output File Name of an individual instance. This is very useful when the job does not run correctly using the original parameters, and you want to adjust them and rerun the job or job group without affecting the original job definition.