Statements
Built-in Commands
You can use the following built-in commands inside any lifecycle block (with the exception of onerror and throw). These commands are operating-system independent.
|
Command |
Description |
|
|
Creates a directory. |
|
|
Copies a file. Typically, the prejob block is used to copy input files from the Driver machine to the staging directory on the Manager, which can be referenced as |
|
|
Removes a directory. The directory must be empty. |
|
|
Deletes a file. Supports the |
|
|
Writes a message to the Driver log (in prejob or postjob lifecycle blocks) or the Engine log (in pretask, task, or posttask lifecycle blocks). |
|
|
Executes a command on the local machine using the shell specified with the Before running custom executables, deploy those executables to Engines using GridServer’s application resource deployment feature. See Resource Deployment for more details. |
|
|
Specifies the shell to spawn for commands run by the |
|
|
Returns the value of the specified environment variable. If the variable is a string literal, enclose it in quotes. Returns an empty string for nonexistent variables. |
|
|
Indicates what happens when an |
|
|
Causes the task to fail and throws an exception. The message is displayed on the Driver and written into the Driver log. This cannot be used in the posttask lifecycle block. |
Enclose arguments to all statements in quotes, except for arguments to onerror. If you include a linebreak in a quoted argument, escape it with a backslash.
The mkdir, copy, delete, and rmdir commands are not dependent on the operating system. Pathnames automatically translate to work on the appropriate platform. For example, mkdir "sample/log1" creates sample\log1 on Windows systems.