Using a Job Property File

A job property file contains arguments that control the execution of jobs when you use the job executor or the Administration Utility to run a job. Use a job property file if you want to reuse arguments by specifying a single argument at the command line (-f) rather than specifying each argument individually at the command line.

To create a property file, create a text file with one argument on each line.

d %
i 30
j validateAddressJob1
u user
p password
s 8888
t 9999
w true

The job property file can contain these arguments:

No?Prints usage information.
Nod delimiterSets instance/status delimiter. This appears in synchronous output only.
NoeUse a secure HTTPS connection for communication with the Spectrum Technology Platform server.
Noh hostnameSpecifies the name or IP address of the Spectrum Technology Platform server.
Noi pollintervalSpecifies how often to check for completed jobs, in seconds. This applies only in synchronous mode.
Yesj jobnameA comma-separated list of jobs to run. Job names are case-sensitive. Jobs are started in the order listed.
Non emaillistSpecifies a comma-separated list of additional email addresses for configured job notifications.
Yesp passwordThe password of the user.

Returns a delimited list with this information about the job written to standard output:

  • Position 1 - Name of job
  • Position 2 - Job process ID
  • Position 3 - Status
  • Position 4 - Start Date - Time (MM/DD/YYYY HH:MM:SS)
  • Position 5 - End Date - Time (MM/DD/YYYY HH:MM:SS)
  • Position 6 - Number of successful records
  • Position 7 - Number of failed records
  • Position 8 - Number of malformed records
  • Position 9 - Currently unused

The information is delimited using the delimiter specified in the -d argument. For example:

MySimpleJob|4|succeeded|04/09/2019 14:50:47|04/09/2019 14:50:47|100|0|0|

Nos portThe socket (port) on which the Spectrum Technology Platform server is running. The default is 8080.
Not timeoutSets the timeout (in seconds) for synchronous mode. The default is 3600. The maximum is 2147483. This is a global, aggregate timeout and represents the maximum time to wait for all spawned jobs to complete.
Yesu usernameThe login name of the user.
NovReturn verbose output.
NowSpecifies to wait for jobs to complete in a synchronous mode.

Using Both Command Line Arguments and a Property File

A combination of both command-line entry and property file entry is also valid. For example:

java -jar jobexecutor.jar -f /dcg/ -j job1

In this case command line arguments take precedence over arguments specified in the properties file. In the above example, the job job1 would take precedence over a job specified in the properties file.