Re: Windows priorities with runtime.exec
- From: Ian Shef <invalid@xxxxxxxxxxxxx>
- Date: Tue, 08 Jun 2010 00:40:19 GMT
Daniel Pitts <newsgroup.spamfilter@xxxxxxxxxxxxxxxxxxx> wrote in
news:XUfPn.140043$0M5.115193@xxxxxxxxxxxx:
On 6/7/2010 12:41 PM, Ian Shef wrote:Even better than my solution. I like it!
Hakan<H.L@xxxxxxxxxxxx> wrote inSounds reasonable, although I would suggest wrapping the whole thing in
news:1275913595.04@xxxxxxxxxxxxxxxxxx:
<snip>
In order to run a SAS job from a Java program, we are using a simple<snip>
runtime.getruntime.exec({"C:/Program
Files/sas.exe","myloc/myfile.sas"}).
That works great, but my boss wants to have it run with a set lower
priority so that it doesn't interrupt other tasks on the server. How
do I do that?
Your example has bad capitalization and will not compile. However...
I have not tried this, but I am going to guess that the solution
involves the "start" command. If you have Windows XP, you might try:
Runtime.getRuntime.exec({"C:/WINDOWS/system32/cmd.exe", "/C", "START",
"/BELOWNORMAL", "C:\\Program Files\\sas.exe", "myloc/myfile.sas"}) ;
I have turned some forward slashes into double backslashes.
Backslashes are needed to meet the expectations of the START command,
and doubling is required for Java strings.
I don't have the right environment to try this, but perhaps it is close
enough to give someone an idea. Perhaps there is an easier way.
Good luck!
a BAT file, to separate the "priority" of the running app from the
concern of the runner app.
.
- References:
- Windows priorities with runtime.exec
- From: Hakan
- Re: Windows priorities with runtime.exec
- From: Ian Shef
- Re: Windows priorities with runtime.exec
- From: Daniel Pitts
- Windows priorities with runtime.exec
- Prev by Date: Re: pattern question ?
- Next by Date: Re: A problem regarding generics
- Previous by thread: Re: Windows priorities with runtime.exec
- Next by thread: Connection Pool with JNDI issue
- Index(es):
Relevant Pages
|