• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2381
  • Last Modified:

Run A Command At Low Priority - Start /Wait Doesn't Work?

On WinXP SP3 I want to run a couple of ROBOCOPY.EXE commands one after the other at low priority in a CMD script. If I use the START command to set the priority like this

START "ROBO C" /WAIT /LOW /B ROBOCOPY.EXE C:\ H:\ROBO\C /E /Z /NP /PURGE /R:0 /W:0
START "ROBO D" /WAIT /LOW /B ROBOCOPY.EXE D:\ H:\ROBO\D /E /Z /NP /PURGE /R:0 /W:0

then the ROBOCOPYs run concurrently despite the /WAIT option. Does anyone know either (a) why my /WAIT option doesn't work and how to fix it or (b) another way to run the ROBOCOPY commands at low priority?

Thanks in advance....
0
jeff1946
Asked:
jeff1946
  • 2
  • 2
1 Solution
 
Steve KnightIT ConsultancyCommented:
I find this happens if you use the /B option.  Take that off and it works as expected.

Steve
0
 
jeff1946Author Commented:
Steve,

Thanks for your quick and effective answer. That certainly seems to fix the problem, although it litters my console with extra Command-Prompt windows. I hope they go away when I run the script as a scheduled task!

Bonus question: Is there any other way to run a command at reduced priority?
0
 
Steve KnightIT ConsultancyCommented:
Yes, it got me the first time I used it!  If you want them to run concurrently any reason why you don't just add them to a batch file btw then START that, i.e.

START /MIN /WAIT /LOW cmd /c yourbatch.cmd

@echo off
REM yourbatch.cmd
ROBOCOPY.EXE C:\ H:\ROBO\C /E /Z /NP /PURGE /R:0 /W:0
ROBOCOPY.EXE D:\ H:\ROBO\D /E /Z /NP /PURGE /R:0 /W:0

I don't know another way offhand, always use START, sorry.

Thanks for the points etc.

Steve
0
 
jeff1946Author Commented:
Steve,

I didn't think of that, but it's a much more elegant solution -- thanks!

Jeff
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now