[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Batch job on stata

From   Partha Deb <>
Subject   Re: st: Batch job on stata
Date   Tue, 22 Apr 2008 12:06:18 -0400

Mathew's suggestion is right on. But to make your life even easier in terms of permissions and keeping track of where your do and log files are/go, try the following.

cd dirname

where dirname is the directory in which you stored your do file.


nohup stata -b do &


stata -b do &

Partha wrote:

When Stata is run in batch mode it automatically creates a log file with
the name of the do file being run in the directory from which Stata is run.
Your problem is probably that you do not have write permission for the
directory.  You can check with `ls -l', or attempt to create a file  `touch
myfile'.  Try starting from another directory, your home directory for

For running batch jobs I prefer:

nohup stata -b do mydofile &

nohup tells linux not to stop the process if the terminal window is closed.


Date: Mon, 21 Apr 2008 16:23:51 -0400
Subject: Re: st: batch job on Linux server


I tried what you suggested and now it's telling me 'unable to
open.....log'.  Did you need to specify the full path name when issuing
'stata' command?  I'm suspecting >I might be at the wrong place

Partha Deb <> 4/18/2008 10:17 PM >>>
Commands as you have described work for me.  However, if your mydofile has
extension, e.g.,, you'll need to add that to the file
stata - bb do &

The ampersand at the end will allow you to get back to your prompt (%)
the Stata job is running.

Hope this helps.
*   For searches and help try:
Partha Deb
Department of Economics
Hunter College
ph:  (212) 772-5435
fax: (212) 772-5398

Emancipate yourselves from mental slavery
None but ourselves can free our minds.
	- Bob Marley

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index