Stop command in midway and restart it. Tags: Programming Command Prompt Apps Last response: June 8, 2012 8:53 AM in Applications Share Vitaminzed June 7, 2012 4:11:02 PM Hi guys! Here's what I need done. I need a batch file to run a command; end it after 10 seconds; and restart the command in an endless loop. Thanks for any help! More about : stop command midway restart Rusting In Peace a b L Programming June 7, 2012 4:25:59 PM Try using something like the following. Replace <commandToRun> with what you actually want to execute and <thisbatchfile> as the name. The ping command is just pinging an address that doesn't exist with a 10 second timeout. <commandToRun>ping 18.104.22.168 -n 1 -w 10000 > nultaskkill /F /IM <commandToRun>call <thisbatchfile> Vitaminzed June 7, 2012 5:19:54 PM This won't work, because the <commandToRun> is a never ending command. Related resources How to stop Windows XP restore install - Forum Gateway Midway 2 PE Mobo and three AGP cards - Forum COMMAND TO RESTART VIA EITHERNET - Forum How to stop a windows service using DOS command prompt on .. - Forum Can't get to a command prompt on restart .. - Forum Can't find your answer ? Ask ! Get the answer hang-the-9 a b L Programming June 7, 2012 7:16:29 PM What exactly is a "never ending command"? If you kill the process, it ends it. Rusting In Peace a b L Programming June 8, 2012 8:53:07 AM Vitaminzed said:This won't work, because the <commandToRun> is a never ending command. You might have viewed my reply before I edited it. Initially I had forgotten the taskkill statement so in that scenario then you would have just had n running instances of the command. But with the taskkill statement and the /F flag then the process will be killed off Can't find your answer ? Ask ! Publish Related resources: ForumWindows 7 crashes (BSOD's) after 'starting windows...' screen ForumUrgent - Stop shutdown command from shuting down domain st.. ForumRegistry problems ForumRestarting over and over then stop error c000021 ForumRestart issue on window 7 ForumStop Windows from restarting ForumCommand prompts Forumstopping WCZ in command line ForumVID card on HTPC ForumBSOD Page_Fault_In_Non_Paged_Area/ Stop 0x50 ForumComputer "freezes," requiring forced restart . ForumUnresponsive after pressing shutdown/ restart button ForumWhat is the difference between Extended and normal version of a software? ForumHow i stop a repetitive structure using keyboard input ForumRun Command Missing More resources Read discussions in other Applications categories Graphics Internet Applications Multimedia Office Security CAD Distributed Computing Drivers Enterprise Software Firmware Programming Photoshop Skype Wordpress !