Any UNIX command can be run in the background by simply placing '&' character at end of the command line.
If you want to run a SPIDER procedure called b01.prj in the background, then place the PROJECT CODE/DATA CODE and starting procedure file name (without PROJECT CODE) on the command line for SPIDER. E.g. If your procedure file is in b01.prj, the procedure can be executed in the background and the output placed in a file called "outfile" as follows:
$ spider prj/tom @b01 > outfile &The system will respond giving PID number for your background process. Should you want to terminate the process give the following UNIX command:
$ kill <PID number>Should you want to suspend and restart the program give the give the following UNIX commands:
$ kill -STOP <PID number>If you forget to start SPIDER in the background and want to place the SPIDER process in the background while it is running, you can halt the process with <CTRL-Z> then issue the "bg" command to restart the process in the background. In the Bourne shell, processes run in the background are terminated when you logout! To prevent this use the "nohup" command:
$ kill -CONT <PID number>
$ nohup spider prj/tom @b01 >outfile &If you run a program in the background and want to retain any error output you can redirect the error output to a file "errfile" as follows:
$ nohup spider prj/tom @b01 >outfile 2>errfile &
On Unix, to start SPIDER (or any given string of commands, for that matter) at given date & hour one can use the UNIX 'at' command (for exact format type man at' on your UNIX machine):
$ at 7:12pm Jan 22
$ SPIDER_LOC/spider prj/tom @b01 < start_up > outfile
date > done_at_this_time
^D
Queues can be set up for different scheduling regimes if needed. Until then you can ensure that your programs are run in desired order by putting them in the desired order in the "at" string of commands)
Source: user_doc.html Last update: 27 March 2001 ArDean Leith