Setting Environment Variables in Apple Qmaster

You may want to set or change an environment variable for submitting certain jobs. When you set an environment variable within Apple Qmaster, the new setting takes effect immediately. This gives you an easy way to do things such as setting common directory paths or plug-in-specific environment variables for Apple Qmaster jobs.

About Environment Variables and Preflight Scripts

You can streamline your workflow with environment variables and preflight scripts.

What’s an Environment Variable?

Environment variables are settings within a shell, from which commands are issued that affect the way a program operates. People who regularly execute commands from a Terminal shell, or write shell scripts, are usually familiar with environment variables.

For example, the environment variable called PATH tells the shell where to look for commands that are entered. The PATH that is specified becomes the search path that is used when locating a program. It is set for you automatically, but you will want to add to it. For instance, if your user name is jane and there is a directory named groupbin (in your home directory) that contains programs you want to run from a shell, the environment variable name would be PATH and the value of that name would be ~jane/groupbin.

What’s a Preflight Script?

A preflight script is a script you can run on each node of a cluster prior to actually processing the batch. These scripts are sent with every distributed segment of a job.

To set environment variables in Apple Qmaster
  1. Select the command for which you want to set an environment variable.

  2. Click the Set Environment button.

  3. In the dialog that appears, you can add preflight scripts and environment variables or edit or remove an existing one.

    Figure. Set Environment dialog.
    • To add a variable: Click the Add (+) button, then select and edit Untitled Variable in both the Name and Value columns.
    • To remove a variable: Select it, then click the Remove (–) button.
  4. Click OK.

Your environment variables take effect immediately, and are retained only for the selected command.