Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: [mg4623] Background jobs
Posted:
Aug 22, 1996 3:29 AM


> Dear All, > > I would like to start a Mathematica job as a background process. > I assumed this would be easy, despite the fact that I couldn't find > anything about this in the manual. However, the run option doesn't seem > to work. I'm using version 2.2. > > Any help would be very much appreciated. > > Loris > >  > ================================================================ > Loris Bennett Tel.: (+49) 30 314 23762 > loris@ferro.physik.tuberlin.de > http://wwwitp.physik.TUBerlin.DE:80/~loris/ > TU Berlin, PN71, Hardenbergstr. 36, 10632 Berlin, FRG > ================================================================
There is nothing inherent to Mathematica to make it run as a background process. This is the operating system's job. So, the question you need to ask is, "how would I make *any* program run as a background process?".
The run argument has nothing to do with the background process...it simply instructs Mathematica what to do when it first starts up. Thus, you could pass it a command through run which tells it to run a package. If you want Mathematica to quit gracefully at the end, then you'd put a Quit[] command at the end of your package.
On a Unixbased system, you could run Mathematica in the background by simply attaching an & after your commandline. For example:
math < infile > outfile &
(note that in Unix, you can also use redirection as I did for input and output files...I find that somewhat easier to remember than the run argument).
Sincerely,
John Fultz jfultz@wolfram.com Applications Group Wolfram Research, Inc.



