Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How do I stop and restart a BAT file automatically

16 Feb 2016   #1
PeteJB

Windows 7 32 Bit Pro
 
 
How do I stop and restart a BAT file automatically

Hi,

I have a bat file that needs to run all the time. Often the app initiated by the bat file, stops working. The developer is working on a solution at the moment, but in the meantime, I'm looking for a workaround.

Is there any way, I can stop and then initiate the bat file on a timer. NOTE that the app just issues spurious error messages, which is more difficult as I can't just use an application monitoring program.


My System SpecsSystem Spec
.
16 Feb 2016   #2
Lance1

Windows 7 Ultimate, Service Pack 1, 64 bit
 
 

Task Scheduler in Administrative Tools should work.
My System SpecsSystem Spec
16 Feb 2016   #3
Ztruker

Windows 10 Pro X64
 
 

When the batch file starts the program, does it immediately regain control or does it have to wait until the program ends before getting control back. If it has to wait then I don't see any way to do it from within the batch file so an external command started via Scheduler as Lance1 mentioned should do the trick.

The task would launch another batch file that will terminate the running program using taskkill. That should then return to the original batch file which could either restart the program or just exit and let the 2nd batch file start the initial batch file again.
My System SpecsSystem Spec
.

Reply

 How do I stop and restart a BAT file automatically




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
New user created automatically with each restart
I am facing this peculiar problem since last 4/5 days. Whenever I log into windows, a new user "wobrsqqw" gets created which is of the type "Standard User". From the control panel, it can be easily deleted. But, if I restart again, as soon as I get into windows, the same user gets created again....
General Discussion
My pc open file automatically, then automatically shut down
My pc open file automatically, then automatically shut down when I running my pc, it create pop up sound then open file automatically then pc get shut down. watching any video file, this create more problem. when i scan all of my hard drives but any virus or virus activity didnt appear....
General Discussion
How to fix windows automatically restart
Hello everyone, My laptop Toshiba A 305 does restart very often while I recharge the battery, But when I use battery, windows can open smoothly without any restart. Also When I recharge battery, I only can operate windows in safe mode without any restart. I tried to clean with my AV in safe...
General Discussion
Is there an easy way to install updates and restart automatically?
Hello there :) I am reinstalling Windows rather often, but would like to do this without creating a slipstream DVD. Windows update has this tendency to wait a couple of hours before telling you that it has found an update. Is there a way to launch the updater agent on startup and then restart the...
Windows Updates & Activation
My computer restart automatically. What can i do?
Sorry i actually don't really understand what 'make a new post in your initial BSOD thread' means - My mother language is not English, sorry for that and i hope i am doing the right thing now. thanks for the advice for my last question. It works in my case but unfortunately i found my computer...
BSOD Help and Support
My computer restart automatically again. What can i do?
My computer had restarted automatically this afternoon, and a message was shown. What can i do? Problem signature: Problem Event Name: BlueScreen OS Version: 6.1.7600.2.0.0.256.1 Locale ID: 1028 Additional information about the problem: BCCode: 8e BCP1:C0000005
BSOD Help and Support


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 17:24.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App