Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

Quick Launch

Average Rating:

(5 Ratings)
facebook Twitter
Print Bookmark Alert me when this article is updated


HOW TO: Run the Informatica Cloud task using Windows batch script/Linux shell script Using RunAJobCli Utility
What is RunAJob utility?
A command line tool used to trigger IICS Tasks. This utility internally uses the REST API service in order to execute IICS tasks.
Note: This is a free tool shipped with Informatica Cloud Secure Agent.

Why is RunAJob utility needed? 
One can have business requirements to run IICS jobs from an external application or check the status of a running task from a Third-Party scheduler. To achieve this requirement the Informatica REST API can directly be invoked. However, one needs to have an understanding of the REST framework, form the web requests for each action, execute it and parse the response. This could be complex and time-consuming. 

RunAJob utility simplifies this operation by performing these individual activities and encapsulating the internal requests and responses. The end user is required to provide only necessary information - for e.g. IICS Account details, Task details, etc.

To run the Informatica Cloud task using Windows batch script/Linux shell script, one should have 'runAJobCli' Package enabled in the IICS org.
To check package 'runAJobCli', log into IICS navigate to the "Administrator" App > Licenses and check the Custom Licenses to see is "runAJobCli" is assigned.
If not assigned, please open a Shipping/License case regarding the same.
After enabling the package, "runAJobCli", the secure agent will create a new Data Integration Service (running jobs will not be impacted) and the package will be downloaded to location "{AgentDir}\Downloads\package-runAJobCli.xx".

Note: Java 1.8 is required to use this utility. To check the java version in the machine, run the following command:
   java -version
If it is not 1.8, please install java 1.8 in the machine/server from where you will be running this command. ​

Exception in thread "main" java.lang.ClassFormatError: com.informatica.saas.utilities.plugins.RunAJobPlugin (unrecognized class file version)
:This​ issue occurs because of the unsupported java version​

The Utility is recommended to be used from "{AgentDir}\apps\runAJobCli\". However, since the utility is a standalone java program, one can use the binaries from "{AgentDir}\Downloads\package-runAJobCli.xx​" and trigger jobs from another server (like Ctrl+m server etc.). ​​

Following are the steps to run the job using the batch script:
1. Configure the Login credentials of Informatica Cloud by creating "" file (using template file "​ located in "{AgentDir}\apps\runAJobCli\"-

 userName=<user name of the org where you want to run the task>
 password=<password of the above user>
Note: All the times are in milliseconds. Also, please make sure there are no additional spaces in the file.

2. Create the "" file (using the template file located in "{AgentDir}\apps\runAJobCli\ by copying and pasting the file and renaming it to "".

3. Following is the syntax of the command. 
 cli.bat runAJobCli -n <task name> -t <task type>
For example,use the following command for Mapping Task :
cli.bat runAJobCli -n KM_MCT_FF_TO_DB2_02503720  -t MTT

4. To run a job using the task name and location to specify the task:
cli.bat runAJobCli -t <tasktype> -n <task name> -fp <folder path to the task>

For example, to run a synchronization task, you might use the following command:
cli.bat runAJobCli -t DSS -n dss_Arch_2308 -fp myproject/folder

5.To run a job using the federated task ID to specify the task:
cli.bat runAJobCli -t <tasktype> -frsId <federated task ID>

For example, to run a synchronization task using the federated task ID, use the following command:
cli.bat runAJobCli -t DSS -frsId kvOF40yLXyUihm7wYYskmh

Use the following arguments in a RunAJob command:
ACTIVITYMONITORWAIT and TOTALWAIT are the key parameters in file to be specified in milliseconds.
ACTIVITYMONITORWAIT is used to handle the delay if any for the task to appear in Activity Monitor. 30 seconds is good for this.
TOTALWAIT will set the frequency at which the utility polls for job status. Usually set to 30sec/1min/2min/3min i.e, 30000/60000/120000
RETRYCOUNT is the number of times it polls for the job status. The recommendation is to know the longest running job and set the retry count accordingly


If a task runs around 25 min, set TOTALWAIT=60000 and RETRYCOUNT=30
This means that utility will poll for the task status 30 times in the interval of 1min, so totally it is 30 min.
If by chance task executes more than 30 mins, the command will exit with return code 6 but the task will continue to run in Informatica Cloud.


Error Code is as follows:

 EXCEPTION("Exception", -1) 
 SUCCESS("Success", 0)  
 WARNING("Warning", 1)  
 NOWAIT("NoWait", 2)  
 FAILURE("Failure", 3) 
 TIMEOUT("Timeout", 4)  
 ERROR("Error", 5)  
 RUNNING("Running", 6)  
 START("Failure", 7)
More Information
Applies To
Product: Cloud Data Integration
Problem Type: Configuration
User Type: Administrator
Project Phase: Configure
Product Version:
Operating System:
Other Software:
Last Modified Date:11/11/2019 5:42 AMID:500262
People who viewed this also viewed


Did this KB document help you?

What can we do to improve this information (2000 or fewer characters)