Solved

Starting a scheduled .CMD task minimized

Posted on 2009-04-09
4
459 Views
Last Modified: 2012-05-06
Hello,

I have a scheduled task which runs c:\auto\myjob.cmd every 2 minutes.  I want to run that window minimized instead of looking at the dos screen everytime it runs.  I have already tried adding start /min "c:\auto\myjob.cmd" in the run property for the job, and all I get is "could not start".  The system is running windows2003 server.  Thanks.
0
Comment
Question by:electricd7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 24109781
Dim objshell : Set objShell = CreateObject( "Wscript.Shell")
objShell.Run "C:\auto\myjob.cmd", 2
'Can even add
'wscript.sleep 120000  ' to wait 2 minutes adn rerun...
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 24109785
That' is a vbscript by the way - name it
filename.vbs
0
 

Author Comment

by:electricd7
ID: 24109867
Perfect.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 24109882
Glad I could help. Thanx for the grade! :^)
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question