How do I stop and restart a BAT file automatically

PeteJB

New member
Local time
12:45 AM
Messages
2
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 Computer My Computer

At a glance

Windows 7 32 Bit Pro
Computer type
PC/Desktop
OS
Windows 7 32 Bit Pro
Task Scheduler in Administrative Tools should work.
 

My Computer My Computer

At a glance

Windows 10 Pro 64 bitAMD FX 9590 8 Core Black EditionCorsair Vengeance 16GB DDR3AMD Radeon (TM) R9 380 Gaming Series
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Built By Me.
OS
Windows 10 Pro 64 bit
CPU
AMD FX 9590 8 Core Black Edition
Motherboard
MSI 990FXA GAMING (MS-7893)
Memory
Corsair Vengeance 16GB DDR3
Graphics Card(s)
AMD Radeon (TM) R9 380 Gaming Series
Sound Card
AMD High Definition
Monitor(s) Displays
Samsung 32" 60Hz 4ms Curved PLS LED
Screen Resolution
1920 X 1080
Hard Drives
C: 223 GB SSD = E: 465 GB HDD = F: 931 GB HDD = G: 149 GB HDD = H: 931 GB HDD
PSU
EVGA Supernova NEX750B 750W ATX EPS12V 80PLUS Bronze
Case
Cool Master
Cooling
Noctua NH-D15 Premium Cooler with 2x NF-A15 PWM 140mm Fan
Internet Speed
Fiber Optic: Download 332.7 Mbps / Upload 331.5 Mbps
Antivirus
Windows Defender
Browser
Slimjet (64bit)
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 Computer My Computer

At a glance

Windows 10 Pro X64Intel Quad Core i7-4770 @ 3.4Ghz16.0GB PC3-12800 DDR3 SDRAM 1600 MHzIntel Integrated HD Graphics
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
Back
Top