Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So, I have a Windows that hosts my things. And I was wondering that can you set like a auto-time to make a CMD window close and start back up with CMD?

This is what I have. I have a Run.bat file that runs the thing, and in that Run.bat file it leads to another .bat file that starts up that host thing (node), runs with CMD.

share|improve this question
5  
You need to stop trying to avoid being specific, and start being specific. I get it that you have this thing that runs with the thing, and the thing that runs it has a thing that does it's thing through the CMD thing. But you know what? That just doesn't cut it. What programs are you talking about? What are the contents of the Batch files? What are you trying to accomplish exactly? – Bon Gart Jun 6 '12 at 21:58

closed as not a real question by techie007, Luke, Bob, Mokubai, Shinrai Jun 7 '12 at 15:08

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

2 Answers

@BonGart is right - it's frustrating when you try to abstract your problem so much as to prevent assistance.

Based on what you DID say I offer this. The task scheduler allows you to start a task at a particular time or event and to force it to close after a period of time.

share|improve this answer

Here's another guess at the request.

The command TASKKILL can be used to terminate processes. See

http://technet.microsoft.com/en-us/library/bb491009.aspx

Starting another process is as simple as typing in its name and any optional parameters.

If you want to put a delay in your bat file, a simple way is this:

PING 1.2.3.4 -n 1 -w 1000

This asks ping to check a non-existent IP address (1.2.3.4) once only (-n 1) and wait for 1000 milliseconds for the reply. Change the "1000" to the number of milliseconds you want to delay.

share|improve this answer
1.2.3.4 is a perfectly valid albeit unallocated IP address. If that changes, your method fails. A more reliable alternative is choice /t S /d y > nul, where S is the number of seconds. – Dennis Jun 7 '12 at 1:33
I know that 1.2.3.4 is a valid IP address, but I'd be extremely surprised if anyone got a ping from it. But I had not thought of using choice for a delay. Good idea! – hdhondt Jun 7 '12 at 1:40
1  
Vista and newer include a timeout program/command. – Bob Jun 7 '12 at 9:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.