next up previous 65
Next: Obtaining and Installing IRAF
Up: IRAF Scripts and Background Jobs
Previous: IRAF Scripts and Background Jobs

Running a background job

It is possible to run IRAF scripts as background jobs. It is necessary to prepare a Unix shell script which starts IRAF and then runs the IRAF script. File background.csh is an example shell script. It is shown in Figure [*]. This example invokes IRAF and uses it to run script submean.cl.

Figure: Example shell script to run IRAF as a background job
\begin{figure}\par
\begin{verbatim}...

The script first ensures that a C shell is used, if it is run as an executable shell script, then IRAF is started and fed with commands. Notice how the $ signs need to be escaped in the task definition to stop the UNIX shell from interpreting them as shell variables. The output is written to file log.file. There is further information about shell scripts in SC/4: C-shell Cookbook[6]).

The script is run from the Unix shell prompt. Simply type:

background.csh &

Output will be written to file log.file. Remember that script submean.cl will only run successfully if image newframe does not already exist.



next up previous 65
Next: Obtaining and Installing IRAF
Up: IRAF Scripts and Background Jobs
Previous: IRAF Scripts and Background Jobs

An Introduction to IRAF
Starlink Guide 12
R. Morris, G.J. Privett & A.C. Davenhall
2nd December 1999
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council