The Script Task is used to execute contents of a shell script on the execution system.
In order to create a Script Task, select a job group and choose "Add Script" from the "Job Preparation" menu. A new task will be added to the tree and the main panel will switch to the Script Task panel.
In the Name field you can enter a name for the Script Task which will be used in the Job Preparation tree.
There are local and remote sources for the specification of a script:
Enter the script directly in the
text area of the Script Editor.
You may want to save your work to
the local file system by selecting `Save' from the `File' pop-up
menu
Load a script from your Local system (Nspace)
or from the Remote system (Xspace
on the Vsite):
Selecting Open from the File pop-up menu will
start a file system browser which can be directed either to your
local or remote file system on the Vsite where the script will run.
You can now load a local or remote script into the Script Editor
where you can modify it according to your needs. The directory,where
the file system browser starts can be specified in the Script
Defaults.
The final contents of the ScriptEditor will be automatically transferred as a script to the Uspace before getting executed.
The execution shell of your script is selected in the Type combo box. Of course, if your script declares a different shell itself this gets precedence (according to the rules of Unix).
Other script options are set in the Options panel:
In the Command line field the script parameters are set which are put on the command line when executing the script.
Enter a list of environment settings (separated by blanks) in the Environment field.
The support of the Runtime Options depend on the NJS server configuration. Please ask your UNICORE administrator for details.
Finally specify file re-directions for the scripts' stdin, stdout, or stderr. These have to be supported by related file imports and exports. If you do not declare stdout and stderr re-directions the results will be presented in the Job Monitoring GUI.
In the File Imports panel you can declare file transfers to the remote Job Directory (Uspace) which are relevant to the execution of the script, e.g. to provide (re-directed) input files.
In the File Exports panel you can declare file transfers from the remote Job Directory (Uspace), e.g. to receive (re-directed) output files.
The procedure for defining imports and exports is explained in detail for the independent Import/Export Task. There are three differences with respect to the independent tasks:
No extra name is specified for the script bounded imports/exports.
The import and export tasks will not show up as individual actions in the Job Preparation tree.
A dependency between the Import task and the Script task as well as one between the Script task and the Export task is set automatically which guarantees that the file transfers will take place before and after the script execution, respectively..