When you have very time consuming job in stata, you can submit the task in tombstone, which will run in the background. Unlike in the Window's version, you do not need to wait for the commands to finish or monitor the computer not to log out.
To do so, you will first need your tombstone account activated. You will also need a do file that contains all the commands, and the data file the do file requires. Check to make sure you have enough memory in your account to have your do file and the data file (cf. Unix Quota). Your tombstone account is connected to what you usually refer to as the H drive. So if you put the files in the H drive, you have them in tombstone.
Then log in to tombstone using secure shell. From the command prompt, in the directory where the do file is, type
batch [Enter]
stata -b do yourdofilename.do (replace yourdofilename with your do file name) [Enter]
Ctrl-d (press control key and d key at the same time)
You will be notified via email when the job is complete.
Alternatively, you can issue a command
stata -b do yourdofilename.do &
Or if you want to log off after issuing a command,
nohup stata -b do yourdofilename.do &
If you want to stop the processing of a long running job, you will need the processing ID (PID). The PID is issued at the time you submit the job. So you may want to make a note of it. In the following example, PID is 4987.
tombstone.Princeton.EDU% stata -b do test.do &
[1] 4987
If you didn't make a note of the PID, you can find it out by giving a command:
ps -l
or
ps | grep yourusername (replace yourusername with your ldap user name)
See more at Stata Corp's page





