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 | E-mail me updates | Report abuse Register or log in to remove Rusting In Peace Programming Expert 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> | Report abuse Vitaminzed June 7, 2012 5:19:54 PM This won't work, because the <commandToRun> is a never ending command. | Report abuse hang-the-9 Programming Expert June 7, 2012 7:16:29 PM What exactly is a "never ending command"? If you kill the process, it ends it. | Report abuse Rusting In Peace Programming Expert 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 | Report abuse Register or log in to remove Ask the community Publish Tom's Hardware>Forum>Applications>Stop command in midway and restart it.> Related ressources: ForumHow to stop Windows XP restore install ForumGateway Midway 2 PE Mobo and three AGP cards ForumCOMMAND TO RESTART VIA EITHERNET ForumHow to stop a windows service using DOS command prompt on .. ForumCan't get to a command prompt on restart .. 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 !