Job

A job is a set of instructions about how, when and where to perform an automated task. In the job rule definition, one can specify an alias (short name) for the job, a command or script to run, an agent or a list of agents needed to run the job, the days and times to run the job, the dependencies (job, file, variable, time) and constraints that need to be satisfied before the job can be run, and other runtime criteria (such as parameter overrides, interception and job control).

A job can be defined and saved. The saved job definition can be scheduled for running as a scheduled job or an unscheduled (ad hoc) job. Jobs may be grouped into a hierarchy, where each job in the group can inherit properties from its parent group. Job groups can belong to other job groups.

A job's or job group's definition can be added to the production schedule either manually on demand or automatically through a calendar.

Job Type

Currently supported job types include:

  • Data Mover Job

  • File Watcher Job

  • Terminator Job

  • Events Job

  • FTP Job

  • Job Group

  • MPEJob

  • OS400 Job

  • OS Job

  • OVMSBatch

  • OVMSCommand

  • OVMS Job

  • Service Job

Job is the base of TA Version 6.5 job types. The FTPJob, JobGroup, MPEJob, OS400Job, OSJob, OVMSBatch, OVMSCommand, OVMSJob and ServiceJob objects are derived from Job and share a common base structure.

To use special characters /, \, ^, –, ?, +, (, ), [, ], {, and } in a job/job group name, add a blackslash (\) before these characters. A backslash functions as an escape character.

Job Instance

A job instance has its own life cycle, with the associated statuses, in the production schedule.

A typical life cycle is one where the job:

  • waits in the production schedule for its dependencies to be met (Waiting On Dependencies).

  • enters a queue and waits for an execution slot to become available (Waiting On Resource).

  • launches on its designated agent (Launched).

  • starts execution successfully on its designated agent (Active).

  • completes normally (Completed Normally).

Other statuses (for example, Completed Abnormally) are also possible depending on certain conditions and exceptions.

Typical Operations:

  • List all job definitions

  • Get a job definition

  • Create a job or a job group

  • Insert a job or a job group into the production schedule

  • Update a job

  • Delete a job

  • Copy a Job

    Note: Copying a job or a group will copy the tag mappings including copy of tag mappings for its child hierarchy.

  • Delete a job

    Note: Deleting a job or a group deletes the tag mappings (including child job related tag mappings). So the ‘Where used’ for the Tag should not show the deleted job or its children.

Job 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.

Get a List of Available Job Definitions

The Job object provides a method called getList. This method has no parameters. This EST API call returns a list of job definitions.

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>xxx</id>
<tes:Job.getList xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
</tes:Job.getList>
</entry>

Get a Specific Job Definition

The Job object provides a method called get. The parameter called id (e.g., 732) is required, and specifies the job definition to be retrieved. This REST API call returns the specified job definition if it exists and an exception if the job definition cannot be found.

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>xxx</id>
<tes:Job.get xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:id>732</tes:id>
</tes:Job.get>
</entry>

Create a Simple Job

The Job object provides the create method. It illustrates how to create a simple job.

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>xxx</id>
<tes:Job.create xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:job>
<tes:name>abc_job1</tes:name>
<tes:type>2</tes:type>
<tes:active>Y</tes:active>
<tes:ownerid>1</tes:ownerid>
<tes:command>hostname</tes:command>
<tes:runuserid>9</tes:runuserid>
<tes:agentid>59</tes:agentid>
<tes:saveoutputoption>Y</tes:saveoutputoption>
</tes:job>
</tes:Job.create>
</entry>

Create a Job with Custom Start Times and Minutes After Hour

It illustrates how to create a job with custom start time.

Note: When you provide a list of custom values within the customstarttimes field, add a backslash (\) before each comma that separates the individual values.

Example: customstarttimes = '1:30\,2:30'

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>101</id>
<tes:Job.create xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:job>
<tes:name>abc_job4</tes:name>
<tes:type>2</tes:type>
<tes:active>Y</tes:active>
<tes:ownerid>1</tes:ownerid>
<tes:command>hostname</tes:command>
<tes:runuserid>1</tes:runuserid>
<tes:agentid>6</tes:agentid>
<tes:saveoutputoption>Y</tes:saveoutputoption>
<tes:repeat>T</tes:repeat>
<tes:customstarttimes>1:30\,2:30</tes:customstarttimes>
</tes:job>
</tes:Job.create>
</entry>

It illustrates how to create a job with minutes after hour.

Note: When you provide a list of minutes within the customstarttimes field, add a backslash (\) before each comma that separates the individual minute values.

Example: customstarttimes = '01\,05\,30'

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>101</id>
<tes:Job.create xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:job>
<tes:name>abc_job4</tes:name>
<tes:type>2</tes:type>
<tes:active>Y</tes:active>
<tes:ownerid>1</tes:ownerid>
<tes:command>hostname</tes:command>
<tes:runuserid>1</tes:runuserid>
<tes:agentid>6</tes:agentid>
<tes:saveoutputoption>Y</tes:saveoutputoption>
<tes:repeat>M</tes:repeat>
<tes:customstarttimes>10\,20\,50</tes:customstarttimes>
</tes:job>
</tes:Job.create>
</entry

Update a Job with Compound Dependencies

It illustrates how to update a job using compound dependencies with dependency ids.

Each reference to a job dependency in the expression must refer to a job dependency definition id and must be surrounded by square brackets.

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:OSJob.update xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:OSJob>
<tes:id>526</tes:id>
<tes:compounddependencies>([70] AND [71]) OR ([69] AND [72])</tes:compounddependencies>
</tes:OSJob>
</tes:OSJob.update>
</entry>

Create a Job with Many Parameters

The Job object provides the create method. The method has many parameters, but not all are required. Default values can be these.

<?xml version="1.0" encoding="UTF-8">
<entry xmlns="http://purl.org/atom/ns#">
<id>xxx</id>
<tes:Job.create xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:job>
<tes:name>abc_job1</tes:name>
<tes:type>2</tes:type>
<tes:active>Y</tes:active>
<tes:ownerid>1</tes:ownerid>
<tes:command>hostname</tes:command>
<tes:runuserid>9</tes:runuserid>
<tes:agentid>59</tes:agentid>
<tes:saveoutputoption>Y</tes:saveoutputoption>
<tes:normalexitfromrange>0</tes:normalexitfromrange>
<tes:inheritoptions>Y</tes:inheritoptions>
<tes:parentid>3</tes:parentid>
<tes:repeatcount>0</tes:repeatcount>
<tes:nearoutage>3</tes:nearoutage>
<tes:allowunscheduled>Y</tes:allowunscheduled>
<tes:exitcodenormaloperator>1</tes:exitcodenormaloperator>
<tes:description> Description </tes:description>
<tes:priority>50</tes:priority>
<tes:concurrency>1</tes:concurrency>
<tes:repeatinterval>0</tes:repeatinterval>
<tes:childrencount>0</tes:childrencount>
<tes:estimatedmethod>1</tes:estimatedmethod>
<tes:parentname>xxx Group</tes:parentname>
<tes:isnotes>false</tes:isnotes>
<tes:timewindowoption>0</tes:timewindowoption>
<tes:dependencylogic>1</tes:dependencylogic>
<tes:inheritagent>Y</tes:inheritagent>
<tes:normalexittorange>0</tes:normalexittorange>
<tes:isrunbook>false</tes:isrunbook>
<tes:repeat />
<tes:trackingmethod>1</tes:trackingmethod>
<tes:waitOperator>N</tes:waitOperator>
<tes:disablecarryover>0</tes:disablecarryover>
<tes:dirty />
<tes:durationestimated>60</tes:durationestimated>
<tes:durationminimum>60</tes:durationminimum>
<tes:inheritcalendar>Y</tes:inheritcalendar>
<tes:jobdetailid>22</tes:jobdetailid>
<tes:alias>22</tes:alias>
<tes:historyretention>30</tes:historyretention>
<tes:calendaroffset>0</tes:calendaroffset>
<tes:excludeabnormalduration>4</tes:excludeabnormalduration>
<tes:allowrerun>Y</tes:allowrerun>
<tes:rerundependency>N</tes:rerundependency>
<tes:savelogonly>N</tes:savelogonly>
<tes:saveoutputoption>N</tes:saveoutputoption>
<tes:durationmaximum>60</tes:durationmaximum>
<tes:inherittimewindow>N</tes:inherittimewindow>
<tes:inheritrepeat>N</tes:inheritrepeat>
</tes:job>
</tes:Job.create>
</entry>

Create a Job with Terminator Flag Options

It creates an OSJob with the Terminator flag options such as terminateparentonerrorflag, terminateparentonabnormalflag, terminateparentonabortflag, onterminatereqignoreflag, and onterminatereqabortactiveflag.

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>101</id>
<tes:OSJob.create xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:osjob>
<tes:name>OSJob8</tes:name>
<tes:active>Y</tes:active>
<tes:ownerid>1</tes:ownerid>
<tes:type>1</tes:type>
<tes:command>cmd</tes:command>
<tes:parameters>/c echo &lt;Local.MyLocalJobVar&gt;</tes:parameters>
<tes:agentid>2</tes:agentid>
<tes:saveoutputoption>Y</tes:saveoutputoption>
<tes:usepasswordwinjob>Y</tes:usepasswordwinjob>
<tes:extendedinfo tes:null="Y"/>
<tes:terminateparentonerrorflag>N</tes:terminateparentonerrorflag>
<tes:terminateparentonabnormalflag>N</tes:terminateparentonabnormalflag>
<tes:terminateparentonabortflag>N</tes:terminateparentonabortflag>
<tes:onterminatereqignoreflag>N</tes:onterminatereqignoreflag>
<tes:onterminatereqabortactiveflag>Y</tes:onterminatereqabortactiveflag>
</tes:osjob>
</tes:OSJob.create>
</entry>

Create a Job Group with Terminator Flag Options

It creates a job group with the Terminator flag options such as terminateparentonerrorflag, terminateparentonabnormalflag, terminateparentonabortflag, onterminatereqignoreflag, and onterminatereqterminateparentflag.

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>101</id>
<tes:JobGroup.create xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:osjob>
<tes:name>OSJob1</tes:name>
<tes:type>2</tes:type>
<tes:active>Y</tes:active>
<tes:ownerid>1</tes:ownerid>
<tes:type>2</tes:type>
<tes:command>cmd</tes:command>
<tes:parameters>/c echo &lt;Local.MyLocalJobVar&gt;</tes:parameters>
<tes:agentid>2</tes:agentid>
<tes:saveoutputoption>Y</tes:saveoutputoption>
<tes:usepasswordwinjob>Y</tes:usepasswordwinjob>
<tes:extendedinfo tes:null="Y"/>
<tes:terminateparentonerrorflag>N</tes:terminateparentonerrorflag>
<tes:terminateparentonabnormalflag>N</tes:terminateparentonabnormalflag>
<tes:terminateparentonabortflag>N</tes:terminateparentonabortflag>
<tes:onterminatereqignoreflag>Y</tes:onterminatereqignoreflag>
<tes:onterminatereqterminateparentflag>N</tes:onterminatereqterminateparentflag>
</tes:osjob>
</tes:JobGroup.create>
</entry>

Insert a Job into the Schedule

The Job object provides the insert method. One can specify the attributes of the Job.

<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:Job.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:Job.insert>
</entry>

The Job object also provides the insertWaitForID method to insert a job into the schedule and wait until API timeout for the jobrun id to return. One can specify the attributes of the Job.

Here the insertWaitForID method inserts a job with ID=342 into the schedule on the startdate='20210707' (7-Jul-2021) and returns the jobrun id.

<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:Job.insertWaitForID xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>342</id>
<startdate>20210707</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>
<timeoutinseconds></timeoutinseconds>
</tes:Job.insertWaitForID>
</entry>

This method returns the Compile Request record and the itemid xml tag contains the jobrun id.

Insert Jobs and Job Groups into the Schedule as a Batch

The Job object provides the insertBatch method to insert two or more jobs or job groups in batch into the schedule.

When inserting jobs or job groups into the schedule using the insertBatch method:

  • A job from the specified list of jobs or job groups is inserted, provided the job’s parent is not part of the selection.

  • Predecessor jobs are inserted into the schedule before the successor jobs

One can specify the attributes of the job or jobgroup.

<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:Job.insertBatch xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<ids><id>800<id><id>812</id></ids>
<startdate>20230120</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>
<async>N</async>
<timeoutinseconds>3600</timeoutinseconds>
</tes:Job.insertBatch>
</entry>

All the fields above are same for the insert and the insertBatch method except for the async and the timeoutinseconds fields:

  • If async=Y or by default, the insertBatch method returns a list of compile requests without the item ids (jobrun ids).

  • If async=N, the insertBatch method returns a list of compile request ids and the item ids (jobrun ids). For a job using a Broadcast agent list, the method returns all the jobrun ids mapped against a single compile request id. If you insert the parent job group and repeat a new occurrence of the child job, the method returns only the first instance of the child job

  • If async=N, the timeoutinseconds is applicable. A timeout exception is thrown if all the jobrun ids cannot be collected within the specified time duration.

Update a JobGroup with a Variable Update

The JobGroup object illustrates the update method. It defines three group variables (moe = 5, larry = 10, curly = 15) in a group with id 248. Larry is updated from 10 to 20. Current values for moe and curly are also supplied or those variables will be removed. The type (1 = group) and the agent id (2) are required or else the API rejects the change. Finally, the embedded xml tags need to be escaped as shown.

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>3</id>
<tes:JobGroup.update xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:jobgroup>
<tes:id>248</tes:id>
<tes:type>1</tes:type>
<tes:agentid>2</tes:agentid>
<tes:variables>
&lt;variables&gt; &lt;variables:row&gt;
&lt;variables:name&gt;moe&lt;/variables:name&gt; &lt;variables:value&gt;5&lt;/variables:value&gt;
&lt;/variables:row&gt; &lt;variables:row&gt;
&lt;variables:name&gt;larry&lt;/variables:name&gt; &lt;variables:value&gt;20&lt;/variables:value&gt;
&lt;/variables:row&gt; &lt;variables:row&gt;
&lt;variables:name&gt;curly&lt;/variables:name&gt; &lt;variables:value&gt;20&lt;/variables:value&gt;
&lt;/variables&gt;
</tes:variables>
</tes:jobgroup>
</tes:JobGroup.update>
</entry>

Note: Use XML encoding for the content embedded within an XML element (<tes:variables> parameter in the example above). Otherwise, the XML parser skips validating this content.

Update a Job with a Variable Update

The Job object illustrates the update method. It updates the Date variable with the system date in M/d/yyyy format. The type agent id (2) is required, or the API rejects the change. Finally, the embedded xml tags need to be escaped, as shown.

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>3</id>
<tes:Job.update xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:job>
<tes:agentid>2</tes:agentid>
<tes:variables>
&lt;variables&gt; &lt;variables:row&gt;
&lt;variables:name&gt;Date&lt;/variables:name&gt; &lt;variables:value&gt;&amp;lt;SysDate.M/d/yyyy&amp;gt;&lt;/variables:value&gt;
&lt;/variables:row&gt; &lt;/variables&gt;
</tes:variables>
</tes:job>
</tes:Job.update>
</entry>

Here, the content embedded within the <tes:variables> parameter is encoded to make sure that the XML parser validates this content successfully.

Update an SAP ServiceJob

The ServiceJob object updates an SAP job.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<entry xmlns="http://purl.org/atom/ns#">
<id>153</id>
<title>TESTSAP</title>
<source>com.tidalsoft.webclient.tes.dsp.db.datatypes.ServiceJob</source>
<tes:ServiceJob.update xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<tes:servicejob>
<tes:servicename>SAP</tes:servicename>
<tes:extendedinfo><?xml version="1.0" encoding="UTF-8" standalone="yes"?><saptask xmlns:ns2="http://www.tidalsoftware.com/scheduler/sapadapter"><userid>4</userid><username>tidalqa</ username><properties/><parameters/><externuid></externuid><jobname>TESTSAP</jobname><clonetag></clo
netag><trackchildren>Y</trackchildren><stepcount>1</stepcount><recipient></recipient><copy>
</copy><blindcopy> </blindcopy><express> </express><noforwarding>
</noforwarding><deliver></deliver><noprint>
</noprint><mailstatus></mailstatus><fromstep>0</fromstep><steps><step><stepid>1</stepid><steptype>2
</steptype><type>ABAP/4</type><stepname>BTCTEST</stepname><stepparams>ASWIN</stepparams><abap><id>1
</id><type>2</type><params>ASWIN</params><varientvalue></varientvalue><oldvariant>ASWIN</oldvariant><runtimevariant></runtimevariant><tempvariant></tempvariant><language></language><abapprogram>BTCTEST</abapprogram><printparams><newrequest>N</newrequest><spoolname></spoolname><priority>5</priority><retention>8</retention><rows>0</rows><column>0</column><format></format><sapcover>D</sapcover><oscover>D</oscover><selcover>N</selcover><recipient></recipient><department></department></printparams><varientvalues/><outputdevice></outputdevice><copies>1</copies><authorization></authorization><title></title><delete>N</delete><print>N</print><objtype></objtype><doctype></doctype><info></info><archive>N</archive><printimmediately>N</printimmediately><pm>1</pm><cmd>BTCTEST(ASWIN)</cmd></abap>
</step></steps></saptask></tes:extendedinfo>
<tes:summaryonly>Y</tes:summaryonly>
<tes:type>8</tes:type>
<tes:active>Y</tes:active>
<tes:serviceid>20</tes:serviceid>
<tes:ownerid>1</tes:ownerid>
<tes:id>153</tes:id>
<tes:name>TESTSAP</tes:name>
</tes:servicejob>
</tes:ServiceJob.update>
</entry>

Update an FTP Job

It updates an FTP job.

<tes:ftpjob>
<tes:anonymous>N</tes:anonymous>
<tes:asciiformat>N</tes:asciiformat>
<tes:ftphost>localhost</tes:ftphost>
<tes:filename>jobfile.txt</tes:filename>
<tes:ftpoperation>0</tes:ftpoperation>
<tes:ftpparameters>0,"localhost","jobfile.txt","Updatedfile",N,N,N</tes:ftpparameters>
<tes:ftpprotocol>ftp</tes:ftpprotocol>
<tes:ftpuserid>3</tes:ftpuserid>
<tes:ftpusername>Administrator</tes:ftpusername>
<tes:localpath>c://</tes:localpath>
<tes:newfilename>Updatedfile</tes:newfilename>
<tes:privatekeylocation/>
<tes:remotepath>e://</tes:remotepath>
<tes:replacefiles>N</tes:replacefiles>
<tes:id>7815</tes:id>
<tes:type>6</tes:type>
<tes:typename>FTPJOB</tes:typename>
<tes:name>FTPJOB</tes:name>
<tes:active>Y</tes:active>
<tes:effectivecalendarid>0</tes:effectivecalendarid>
<tes:ownerid>1</tes:ownerid>
<tes:ownername>dv\tes</tes:ownername>
<tes:lastusermodifiedtime>2019-11-13T02:22:40-0800</tes:lastusermodifiedtime>
<tes:alias>7815</tes:alias>
<tes:dirty></tes:dirty>
<tes:extendedinfo>&lt;ftp&gt;&lt;protocol&gt;ftp&lt;/protocol&gt;&lt;/ftp&gt;
</tes:extendedinfo>
<tes:successorsvalue>N</tes:successorsvalue>
<tes:predecessorsvalue>N</tes:predecessorsvalue>
<tes:runtimeusername>Administrator</tes:runtimeusername>
<tes:childrencount>0</tes:childrencount>
<tes:agentid>2</tes:agentid>
<tes:effectiveagentid>2</tes:effectiveagentid>
<tes:agentname>MS-WIN-122</tes:agentname>
<tes:agenttype>6</tes:agenttype>
<tes:agentostype>1</tes:agentostype>
<tes:allowunscheduled>Y</tes:allowunscheduled>
<tes:inheritcalendar>N</tes:inheritcalendar>
<tes:inheritagent>N</tes:inheritagent>
<tes:inherittimewindow>N</tes:inherittimewindow>
<tes:command>c://</tes:command>
<tes:allowrerun>Y</tes:allowrerun>
<tes:concurrency>1</tes:concurrency>
<tes:createtime>2019-11-13T02:22:40-0800</tes:createtime>
<tes:dependencylogic>1</tes:dependencylogic>
<tes:disablecarryover>0</tes:disablecarryover>
<tes:durationestimated>60</tes:durationestimated>
<tes:durationmaximum>60</tes:durationmaximum>
<tes:durationminimum>60</tes:durationminimum>
<tes:estimatedmethod>1</tes:estimatedmethod>
<tes:excludeabnormalduration>4</tes:excludeabnormalduration>
<tes:exitcodenormaloperator>1</tes:exitcodenormaloperator>
<tes:fullpath>\FTPJOB</tes:fullpath>
<tes:historyretention>7</tes:historyretention>
<tes:inheritoptions>N</tes:inheritoptions>
<tes:inheritrepeat>N</tes:inheritrepeat>
<tes:jobdetailid>7815</tes:jobdetailid>
<tes:nearoutage>3</tes:nearoutage>
<tes:normalexitfromrange>0</tes:normalexitfromrange>
<tes:normalexittorange>0</tes:normalexittorange>
<tes:parameters>0,"localhost","jobfile.txt","Updatedfile",N,N,N</tes:parameters>
<tes:priority>50</tes:priority>
<tes:repeat/>
<tes:rerundependency>N</tes:rerundependency>
<tes:saveoutputoption>Y</tes:saveoutputoption>
<tes:trackingmethod>1</tes:trackingmethod>
<tes:unixprofile>0</tes:unixprofile>
<tes:waitOperator>N</tes:waitOperator>
<tes:waitoperator>N</tes:waitoperator>
<tes:environmentfile>e://</tes:environmentfile>
<tes:runuserid>3</tes:runuserid>
<tes:concurrencytype>6</tes:concurrencytype>
<tes:localuserid>3</tes:localuserid>
<tes:localusername>Administrator</tes:localusername>
</tes:ftpjob>

Assign a job to a tag

The job object provides a method called assignjobstotag. This REST API call allows a user to assign a job to one or more tags.

<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:Job.assignjobstotag xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<dataAlias>job alias 1, job alias 2, job alias 3</dataAlias>
<tags>Tag 1,Tag 2</tags>
</tes:Job.assignjobstotag>
</entry>

These fields are required to assign a job to a tag:

  • Tag names should be provided as comma-separated string, and should reference a valid existing tag that is not deleted or disabled.

  • Job Alias should be provided as comma-separated string, and should reference a valid existing job that is not deleted.

This API call is additive in nature, which means that each tag name provided will be an additional mapping to the job alias.

Remove a Job from a Tag

The job object provides a method called removejobsfromtag. This REST API call allows a user to remove mapping of job to one or more tags.

<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:Job.removejobsfromtag xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<dataAlias>job alias 1, job alias 2</dataAlias>
<tags>Tag 1, Tag 2</tags>
</tes:Job.removejobsfromtag>
</entry>

These fields are required to remove a job from a tag:

  • Tag names should be provided as comma-separated string, and should reference a valid existing tag that is not deleted or disabled.

  • Job Alias should be provided as comma-separated string, and should reference a valid existing job that is not deleted.

This API call is subtractive in nature, which means that each tag name provided will be removed from the tag mapping to the job alias.

Get Tags

The job object provides a method called Job.getTags. This REST API call allows a user to retrieve a list of tag names mapped to a job as a comma-separated string.

<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:Job.getTags xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>1</id>
</tes:Job.getTags>
</entry>

Note: The “id”is the required field.

Get SLA History

The job object provides a method called Job.getSLAHistory that retrieves SLA history records directly from the database for a specific Job 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:Job.getSLAHistory xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id></id>
</tes:Job.getSLAHistory>
</entry>

Note: The “id” is the Job ID, which is a required field.

Apply Shared Ownership Policies to Job Definitions

The job object provides a method called Job.applySharedOwnershipPoliciesToJob that applies shared ownership policies to a job object with a specific Job ID.

<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:Job.applySharedOwnershipPoliciesToJob xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>230</id>
</tes:Job.applySharedOwnershipPoliciesToJob>
</entry>

Get Shared Owner IDs

The job object provides a method called Job.getSharedOwnerIds that retrieves the shared owner IDs for a specific Job ID.

<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:Job.getSharedOwnerIds xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>23</id>
</tes:Job.getSharedOwnerIds>
</entry>

Get Shared Owners

The job object provides a method called Job.getSharedOwners that retrieves the shared owners for a specific Job ID.

<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:Job.getSharedOwners xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>23</id>
</tes:Job.getSharedOwners>
</entry>

Set Last Run

The job object provides a method called Job.setLastRun that allows users to add the status of the job, exit code, run date, and the actual duration of the jobrun for a specific Job ID.

<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://purl.org/atom/ns#">
<tes:Job.setLastRun xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
<id>289</id>
<status>101</status>
<exitcode>0</exitcode>
<duration>1</duration>
<rundate>20220119062833</rundate>
</tes:Job.setLastRun>
</entry>

This method executes only if users have permission to edit last run status of jobs. The run date format is yyyyMMddHHmmss.