Running A Job from the Command Line

Before you can run a job from the command line, it must be exposed. To expose a job, open the job in Enterprise Designer and select File > Expose/Unexpose and Save.

To run a job from the command line, you must install the job executor utility on the system where you want to run the job. The Job Executor is available from the Spectrum™ Technology Platform Welcome page on the Spectrum™ Technology Platform server (for example, http://myserver:8080).


java -jar jobexecutor.jar -u UserID -p Password -j Job [Optional Arguments]
Required Argument Description
No -? Prints usage information.
No -d delimiter Sets instance/status delimiter. This appears in synchronous output only.
No -e Use a secure HTTPS connection for communication with the Spectrum™ Technology Platform server.
No -f property file Specifies a path to a job property file. A job property file contains job executor arguments. For more information on job property files, see Using a Job Property File.
No -h host name Specifies the name or IP address of the Spectrum™ Technology Platform server.
No -i poll interval Specifies how often to check for completed jobs, in seconds. This applies only in synchronous mode.
Yes -j job name A comma-separated list of jobs to run. Job names are case-sensitive. Jobs are started in the order listed.
No -n email list Specifies a comma-separated list of additional email addresses for configured job notifications.
No -o property file

Specifies a path to a dataflow options property file. Use a dataflow options property file to set options for stages in the dataflow. In order to set dataflow options using a property file, you must configure the dataflow to expose stage options at runtime. For more information, see Adding Dataflow Runtime Options.

For example, a dataflow options properties file for a dataflow that contains an Assign GeoTAX Info stage may look like this:

Yes -p password The password of the user.
No -r

Specify this argument to return a detailed report about the job. This option only works if you also specify -w . The report contains the following information:

  • 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

For example:

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

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

No -s port The socket (port) on which the Spectrum™ Technology Platform server is running. The default is 8080.
No -t timeout Sets 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.
Yes -u user name The login name of the user.
No -v Return verbose output.
No -w Runs job executor in synchronous mode. This means that job executor remains running until the job completes.

If you do not specify -w, job executor exits after starting the job, unless the job reads from or writes to files on the server. In this case, job executor will run until all local files are processed, then exit.

No StageName=Protocol:FileName Overrides the input or output file specified in Read from File or Write to File. For more information, see Overriding Job File Locations.
No StageName:schema=Protocol:SchemaFile Overrides the file layout definition specified in Read from File or Write to File with one defined in a schema file. For more information, see Overriding the File Format at the Command Line.

Example Use of Job Executor

The following example shows command line invocation and output:

D:\spectrum\job-executor>java -jar jobexecutor.jar -u user123 -p "mypassword" -j validateAddressJob1 -h -s 8888 -w -d "%" -i 1 -t 9999


In this example, the output indicates that the job named 'validateAddressJob1' ran (with identifier 105) with no errors. Other possible results include "failed" or "running."