JobRun
Associated with a Job is JobRun. JobRun is used to monitor and assign status, and take actions (cancel, rerun) based on the current status.
Note: The Client Manager Web UI and JobRun.getList API retrieve cached jobrun data (based on the number of production days stored in the CM cache). On the other hand, the API calls JobRun.getHistory and JobRun.getHistoryByProdDate retrieve jobrun data from the database based on input parameters.
JobRun Type
TA supports these JobRun types that share a common JobRun base structure:
-
DataMoverJobRun
-
FileWatcherJobRun
-
MilestoneJobRun
-
TerminatorJobRun
-
FTPJobRun
-
JobRunGroup
-
MPEJobRun
-
OS400JobRun
-
OSJobRun
-
OVMSBatchJobRun
-
OVMSCommandJobRun
-
OVMSJobRun
-
QueuedJobRun
-
ServiceJobRun
Typical Operations
Assign status:
-
Cancel
-
Cancel all
-
Cancel Override Dependency
-
Hold
-
Override a JobRun instance
-
Override a JobDependency instance
-
Release
-
Release Children
-
Remove
-
Rerun
-
Rerun Child Jobs
-
Revert
-
Revert Children
JobRun Examples
From the browser, issue and click Manual Commands (Post). Test the REST API examples from the Client Manager API post screen that appears. Likewise, error messages and exceptions are displayed for invalid parameters and unsuccessful execution of a request.
Insert a JobRun into the Schedule
The JobRun object provides a method called insert. This REST API call inserts a jobrun into the schedule.
<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.insert xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id></id>
<startdate></startdate>
<fromtime></fromtime>
<untiltime></untiltime>
<riskfromtime></riskfromtime>
<riskuntiltime></riskuntiltime>
<breachfromtime></breachfromtime>
<breachuntiltime></breachuntiltime>
<critical></critical>
<params></params>
<vars></vars>
<deps></deps>
<usejobtz></usejobtz>
<waitop></waitop>
</tes:JobRun.insert>
</entry>
Override a JobRun Instance
The JobRun object provides a method called override. The parameter called id (e.g., 120) specifies the JobRun instance to be overridden. This REST API call overrides JobRun 120.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>xxx</id>
<tes:JobRun.override xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>120</tes:id>
</tes:JobRun.override>
</entry>
Override a Job Dependency Instance of a JobRun
The JobRun object provides a method called overrideDependency. The method has two parameters. The first parameter called id (e.g., 124) specifies the JobRun instance. The second parameter called jobrundepid (e.g., 40) specifies the JobDep (Job dependency) instance. This REST API call overrides JobDependency 40 of JobRun 124.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>1</id>
<tes:JobRun.overrideDependency xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>124</tes:id>
<tes:jobrundepid>40</tes:jobrundepid>
</tes:JobRun.overrideDependency>
</entry>
Cancel a JobRun
The JobRun object provides a method called cancel.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>1</id>
<tes:JobRun.cancel xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>xxx</tes:id>
</tes:JobRun.cancel>
</entry>
Cancel a Job Dependency Override
The JobRun object provides a method called cancelOverrideDependency to cancel any previous override(s) of a job dependency. It cancels the override of a job dependency with the id:40.
<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.cancelOverrideDependency xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>124</id>
<jobrundepid>40</jobrundepid>
</tes:JobRun.cancelOverrideDependency>
</entry>
The cancelOverrideDependency API request is successful if the specified dependency has been overridden.
Set the Status of a JobRun
The JobRun object provides a method called assignStatus.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>1</id>
<tes:JobRun.assignStatus xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>xxx</tes:id>
<tes:status>status_value</tes:status>
</tes:JobRun.assignStatus>
</entry>
Hold a JobRun
The JobRun object provides a method called hold.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.hold xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>1067326</tes:id>
</tes:JobRun.hold>
</entry>
Release a JobRun
The JobRun object provides a method called release.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.release xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>1067326</tes:id>
</tes:JobRun.release>
</entry
Rerun a JobRun
The JobRun object provides a method called rerun.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.rerun xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>1067327</tes:id>
</tes:JobRun.rerun>
</entry>
Revert a JobRun
The JobRun object provides a method called revert.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.revert xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>1067328</tes:id>
</tes:JobRun.revert>
</entry>
Get Tags
The jobrun object provides a method called JobRun.getTags. This REST API call allows a user to retrieve a list of tag names mapped to a jobrun as a comma-separated string. The tags for a JobRun are those assigned to its parent job definition.
<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.getTags xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>1</id>
</tes:JobRun.getTags>
</entry>
Note: ID is the required field.
Release Children JobRun
The jobrun object provides a method called releaseChildren.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.releaseChildren xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>1067328</tes:id>
</tes:JobRun.releaseChildren>
</entry>
Rerun Child JobRun
The jobrun object provides a method called rerunChildJobs.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.rerunChildJobs xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>1067328</tes:id>
</tes:JobRun.rerunChildJobs>
</entry>
Revert Children JobRun
The jobrun object provides a method called revertChildren.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.revertChildren xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>1067328</tes:id>
</tes:JobRun.revertChildren>
</entry>
Set Track Critical Path
The jobrun object provides a method called JobRun.setTrackCriticalPath. This REST API call allows a user to set the flag to track the critical path for the jobrun.
<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.setTrackCriticalPath xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id></id>
<critical></critical>
</tes:JobRun.setTrackCriticalPath>
</entry>
Note: The ID is the required field.
Get SLA History
This jobrun object provides a method called JobRun.getSLAHistory that retrieves SLA history records directly from the database for a specific JobRun ID. The method returns the history records in descending order of Create Time, similar to the JobRun.getHistory method.
<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.getSLAHistory xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id></id>
</tes:JobRun.getSLAHistory>
</entry>
Note: The “id” is the JobRun ID, which is a required field.
Get History By Production Date
The jobrun object provides a method called JobRun.getHistoryByProdDate. This method is used to retrieve the jobrun history by production date from the database in descending order of JobRun ID.
<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.getHistoryByProdDate xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<queryDate></queryDate>
</tes:JobRun.getHistoryByProdDate>
</entry>
Note: The “queryDate” is the production date (in the format “yyyyMMdd”). This is a required field.
Get Shared Owner IDs
The jobrun object provides a method called JobRun.getSharedOwnerIds that retrieves the shared owner IDs for a specific JobRun ID.
<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.getSharedOwnerIds xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>23</id>
</tes:JobRun.getSharedOwnerIds>
</entry>
Get Shared Owners
The jobrun object provides a method called JobRun.getSharedOwners that retrieves the shared owners for a specific JobRun ID
<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.getSharedOwners xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>23</id>
</tes:JobRun.getSharedOwners>
</entry>
Terminate a Job Run
The jobrun object provides a method called JobRun.terminate that terminates a jobrun for a specific JobRun ID.
<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.terminate xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>776</id>
</tes:JobRun.terminate>
</entry>
Reset Job Priority
The jobrun object provides a method called JobRun.resetPriority that resets the jobrun priority to the value specified in the Job definition for a specific JobRun ID.
<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:JobRun.resetPriority xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>93</id>
</tes:JobRun.resetPriority>
</entry>