Platform Agent Definition Types
Platform Agent Definition Types let you execute processes on Platform Agents running on customer computers.
Note: Installing and using Redwood Server Platform Agents on Unix, HP OpenVMS, and Windows Servers requires a specific license.
Some script types require specific software on the target computer. For example, the Platform Agent for a given operating system might be capable of running Perl scripts only if an optional Perl interpreter is installed on that particular system. The same is true for UNIX Definition Types such as BASH, CSH and KSH. These can run only if the appropriate shell is installed.
Tip: UNIX Definition Types can run on Windows computers if a UNIX emulation package is installed.
Interpreter Options
You can override the default interpreter for some Definition Types by specifying an interpreter at the Process Server level with the LocalInterpreter_<JOBDEFINITIONTYPE>
Process Server parameter. For example, you can set LocalInterpreter_BASH
to /usr/local/bin/bash
. You can also specify a list of allowed interpreters on Process Server-level using the InterpreterWhitelist_<JOBDEFINITIONTYPE>
Process Server parameter, and override the default interpreter at the Process Definition level with the parameter JCS_INTERPRETER_<JOBDEFINITIONTYPE>
. To do so, create the appropriate parameter and assign to it the path of the desired interpreter. Note that such interpreters must be white-listed using the InterpreterWhitelist_<JOBDEFINITIONTYPE>
Process Server parameter.
Environment on UNIX and Windows
Platform Agent processes do not automatically source UNIX-style profile files, because such files often contain statements that are not suited for batch programs, and because some languages (such as Perl and Groovy) are usually not available in the login shell. However, RunMyJobs offers alternative methods to configure the environment.
The environment that a Platform Agent process starts with on UNIX is as follows.
- A subset of the variables that the Platform Agent started with, limited by the Process Server parameter KeepEnvironmentVariables.
- The following variables are set to the appropriate value:
PATH
,SHELL
,HOME
,LOGNAME
,USER
,USERNAME
,TMPDIR
,TMP
,TEMP
,JCS_JOB_FILES_DIR
, andJCS_JOB_ID
. - The parameters defined in the Process Definition.
On Windows, the environment is as follows.
- The system environment variables set in the Control Panel.
- The following variables are set to the appropriate value:
PATH
,USERNAME
,USERDOMAIN
,USERPROFILE
,TMPDIR
,TMP
,TEMP
,JCS_JOB_FILES_DIR
, andJCS_JOB_ID
. - The parameters defined in the Process Definition.
You can extend the environment using the following mechanisms.
- If you have variables that you want to set per Process Server, and you want to control the values from the scheduler, you can set them in the EnvironmentVariables parameter.
- If you have variables that you want to set per Process Server, and you want to control the values from the operating system, put them in a file and point the EnvironmentFile parameter to that file(for example,
/opt/redwood/agent/etc/environment
orC:\\Program Files\\Redwood\\Agent\\environment
). - If you have variables that you want to set per user or home directory, and you want to control the values from the operating system, put them in files and point the EnvironmentFile parameter to those files (for example
${HOME}/.environment
orC:\\Users\\${USERNAME}\\environment
).
The last method works because EnvironmentFile allows substitution variables that are evaluated in context on the Platform Agent, with the above parameters set.
EnvironmentFile, after resolving any variables, should point to a file with entries in the following format:
<var>=<value>
<var>=<value>
...
If you want to use special characters, use "
to define variables that include spaces, and \
to escape special meaning of characters. Variables that are already set can be referred to by ${<var>}
(the braces are not optional.) Use a separate line for each variable. #
introduces a comment that lasts until the end of the line.
Note: The file format does not allow programming constructs. It is interpreted by the job-processor, not executed by any shell.