Running production jobs from a command line
Command-line switches enable you to schedule production jobs to run automatically at certain times by using scheduling utilities available on your operating system. The basic form of the command-line argument is:
Windows:
stats --production filename.spj
MacOS:
./stats --production filename.spj
Depending on how you invoke the production job, you might need to include directory paths for the application's executable file (located in the directory in which the application is installed) and/or the production job file.
You can run production jobs from a command line with the following switches:
-production [prompt|silent]. Start the application in production mode. The prompt
and silent
keywords specify whether to display the dialog box that prompts
for runtime values if they are specified in the job. The prompt keyword
is the default and shows the dialog box. The silent keyword suppresses
the dialog box. If you use the silent
keyword, you can define the runtime symbols with the -symbol
switch. Otherwise, the default value
is used. The -switchserver
and -singleseat
switches are ignored when using
the -production
switch.
-symbol <values>. List of symbol-value pairs used in the production job. Each symbol
name starts with @. Values that contain spaces should be enclosed
in quotes. Rules for including quotes or apostrophes in string literals
may vary across operating systems, but enclosing a string that includes
single quotes or apostrophes in double quotes usually works (for example, “'a quoted value'”
). The symbols
must be defined in the production job using the Runtime Values tab. See the topic Runtime values for more information.
-background. Run the production job in
the background on a remote server. Your local computer does not have
to remain on and does not have to remain connected to the remote server.
You can disconnect and retrieve the results later. You must also include
the -production
switch and specify the server using the -server
switch.
To run production jobs on a remote server, you also need to specify the server login information:
-server <inet:hostname:port> or -server <ssl:hostname:port>. The name or IP address and port number of the server. Windows only.
-user <name>. A valid user name. If a domain name is required, precede the user name with the domain name and a backslash (\). Windows only.
-password <password>. The user's password.
For a complete list of command line switches, see Command line options.
Example
Windows:
stats --production /Users/Simon/job.spj silent --symbol @sex male
MacOS:
./stats --production /Users/Simon/job.spj silent --symbol @sex male
- This example assumes that you are running the command line from the installation directory, so
no path is required for the IBM SPSS Statistics Subscription
executable file. The default installation path is as follows:
Windows: $InstalledPath$
MacOS: /Applications/IBM SPSS Statistics/SPSS Statistics.app/Contents/MacOS
- The directory path for the location of the production job uses the Windows back slash
convention. On Macintosh and Linux, use forward slashes. The forward slashes in the quoted data file
specification will work on all operating systems since this quoted string is inserted into the
command syntax file and forward slashes are acceptable in commands that include file specifications
(for example,
GET FILE
,GET DATA
,SAVE
) on all operating systems. - The
silent
keyword suppresses any user prompts in the production job, and the--symbol
switch inserts the supplied string ('male') wherever the runtime symbol @sex appears in the command syntax files included in the production job.