Re: Background jobs
- To: mathgroup at smc.vnet.net
- Subject: [mg4672] Re: [mg4623] Background jobs
- From: John Fultz <jfultz>
- Date: Thu, 22 Aug 1996 03:55:23 -0400
- Sender: owner-wri-mathgroup at wolfram.com
> 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 at ferro.physik.tu-berlin.de > http://wwwitp.physik.TU-Berlin.DE:80/~loris/ > TU Berlin, PN7-1, 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 Unix-based system, you could run Mathematica in the background by simply attaching an & after your command-line. 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 at wolfram.com Applications Group Wolfram Research, Inc. ==== [MESSAGE SEPARATOR] ====