REST API Reference > RunAJob utility > RunAJob utility setup
  

RunAJob utility setup

To set up the RunAJob utility, create copies of the RunAJob properties template files that are included with the utility and configure the new files.
The RunAJob utility includes the following template files:
To customize the RunAJob properties, copy the template files to create a restenv.properties file and optionally a log4j2.properties file, and then configure the properties. Or, you can update existing restenv.properties and log4j2.properties files if you already have them. Use the template files that are included with the utility as a reference.
You can find the template files in the following location:
<Secure Agent installation directory>\apps\runAJobCli

Login properties

Specify Informatica Intelligent Cloud Services login credentials in the restenv.properties file. Or, you can include the login parameters as arguments in a task command.
Use login credentials for a native Informatica Intelligent Cloud Services user account. You can't use a SAML user account for the RunAJob utility.
You can use a password string or an encrypted password for the password parameter value.
To create an encrypted password, use one of the following commands:
./cli.sh encryptText -t <password>
./cli.sh encryptText -text <password>
Copy the encrypted password string and replace the password in the restenv.properties file with the encrypted string, and then set the use.encryption flag to true.
The following example shows the restenv.properties file with an encrypted password and the use.encryption flag set to true:
username=saki
password=:1xCGDTC0oD9B2Rmd8Sr4IZWaWWkcEmiK5fy+GkycA==
ACTIVITYMONITORWAIT=2000
TOTALWAIT=60000
PROXYHOST=
PROXYPORT=
RETRYCOUNT=30
use.encryption=true
Include the following parameters in the restenv.properties file or in task commands:
Parameter
Description
baseUrl
Base URL.
Default is https://dm-us.informaticacloud.com/ma.
username
Informatica Intelligent Cloud Services user name.
password
Informatica Intelligent Cloud Services password or encrypted password string.
use.encryption
Enables use of an encrypted password. To use an encrypted password, set the value to true.
For more information, see RunAJob utility arguments

Job status

Specify the frequency at which the RunAJob utility polls for status in the restenv.properties file.
You can use the following parameters:
Parameter
Description
ACTIVITYMONITORWAIT
The amount of time the utility waits before retrying if an internal exception occurs, such as a login failure or network problem.
Default is 5000 milliseconds.
TOTALWAIT
The maximum amount of time the utility waits for a job to complete before polling the activity monitor and activity log again for status.
Default is 5000 milliseconds.
RETRYCOUNT
The number of times the utility polls for status. This parameter is used for polling the activity monitor and activity log for job status and for internal exceptions such as login failure or network problems.
Default is 6.
Note: Informatica Intelligent Cloud Services adds 10 seconds between each API call to prevent server issues.
When configuring the restenv.properties file for polling job status, consider the values you set for TOTALWAIT in conjunction with RETRYCOUNT, keeping in mind the amount of time you expect a job to run.
For example, if you expect a job to run for approximately 25 minutes, you might want to set the parameters as follows:
TOTALWAIT=60000
RETRYCOUNT=30
With these settings, the utility polls for the job status every 60 seconds up to 30 times with 10 seconds between each retry, which totals 35 minutes. If the job executes more than 35 minutes, the command will exit with return code 6 (which means the job is running) and the job will continue to run in Informatica Intelligent Cloud Services.
When configuring the restenv.properties file for internal exceptions, consider the values you set for ACTIVITYMONITORLOG in conjunction with RETRYCOUNT.
For example, you might set these parameters as follows:
ACTIVITYMONITORWAIT=5000
RETRYCOUNT=30
With these settings, if a user login fails, the utility retries the login every 5 seconds up to 30 times.

Log file detail

You can set the level of job detail to include in log files in the log4j2.properties file.
By default, the level of detail is set to INFO. At this level, log files include basic information such as user ID, job ID, and the time that the task was initiated. If you want log files to include job details for debugging purposes, you can change the level of detail to DEBUG. Or, for fine-grained details, you can change the level to TRACE.
To set the level of detail, change the value of the following parameter in the log4j2.properties file:
rootLogger.level=INFO