Need help setting up a specific task in Task Scheduler

moundtown

New member
Local time
2:02 PM
Messages
10
I would think this would be an easy thing to set up but I can't get it right. All I want to do is have a program close and then restart every four hours. No matter how I configure it the scheduler always starts a second instance without closing the first one. Can someone show me how this can be done properly?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell
OS
Windows 7 Pro 32 bit
That tutorial does not explain how to do what I want to do.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell
OS
Windows 7 Pro 32 bit
Set up an action that taskkill's the running process.

taskkill blahblah.exe
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
dell precision t3400 tower
OS
Linux Lite 3.2 x64; Windows 7, 8.1
CPU
Core2Duo 2.4
Memory
6GB ddr2
Graphics Card(s)
nVidia
Hard Drives
120gb SSD, 1TB HD, 2TB HD; sata II
Internet Speed
12/2
Browser
Vivaldi, Slimjet (Chromium) x64
Assuming you only have one instance running with the same name, you could use this batch file. This example kills notepad.exe, then waits 2 seconds before starting notepad again:
Code:
@ECHO OFF
taskkill /IM notepad.exe
timeout /T 2
notepad
Put the code in a text file and save it with the extension .bat Then change the sch. task to run the .bat file
You need to change the two occurrences of notepad to the program you want restarted.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP Elitebook 8540p
OS
Windows 7 Pro 32
CPU
Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz
Motherboard
Hewlett-Packard 1521
Memory
4,00 GB (Usable 2,98)
Graphics Card(s)
NVIDIA NVS 5100M
Sound Card
NVIDIA High Definition Audio
Screen Resolution
1600x900
Hard Drives
INTEL SSDSA2CW120G3
Antivirus
F-Secure Internet Security
Browser
IE, Firefox, Opera
Other Info
Sandboxie,
SRP (Software Restriction Policy),
EMET (Enhanced Mitigation Experience Toolkit),
WFC (Windows Firewall Control by BiniSoft),
Malwarebytes Premium
Assuming you only have one instance running with the same name, you could use this batch file. This example kills notepad.exe, then waits 2 seconds before starting notepad again:
Code:
@ECHO OFF
taskkill /IM notepad.exe
timeout /T 2
notepad
Put the code in a text file and save it with the extension .bat Then change the sch. task to run the .bat file
You need to change the two occurrences of notepad to the program you want restarted.

I changed the two occurrences of notepad to the program name, saved it as a .bat file, when I run it absolutely nothing happens.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell
OS
Windows 7 Pro 32 bit
Delete the @ECHO OFF statement and add a pause command as the last command in the bat file.
This will display all commands in the bat cmd window, and keep the cmd window open so you can see any error messages.

You can post a screen print of the cmd window for help with troubleshooting any errors in your bat file.
http://www.sevenforums.com/tutorials/9733-screenshots-files-upload-post-seven-forums.html

You can then press enter to close the cmd window.

Here's an example of the bat file using notepad as the program to close/restart
Code:
taskkill /IM notepad.exe
timeout /T 2
notepad  
pause
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
home built
OS
Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
CPU
AMD Athlon II x4 620
Motherboard
Gigabyte GA-MA785G-UD3H
Memory
6GB GSkill DDR2 800
Graphics Card(s)
AMD 4670 GPU + AMD 4200 IGP
Sound Card
on board Realtek ALC889A
Monitor(s) Displays
RCA 40" LCD TV, Insignia 32" LCD TV, HP 15" LCD monitor
Screen Resolution
1680 x 1050
Hard Drives
OCZ Vertex 3 120GB,
Samsung F3 1TB (3),
Several others - WD, Seagate, Hitachi, ...
PSU
Corsair 500 W
Case
Rosewill mid tower
Cooling
CM 90mm rifle
Keyboard
Gyration wireless, Logitech wireless, Dell USB wired
Mouse
Gyration wireless, Logitech wireless, V7 USB wired
Internet Speed
Spectrum - 100Mbps D / 10Mbps U
Antivirus
Avast, MBAM3, EMET, WinPatrol
Browser
Pale Moon, Firefox, IE
Other Info
2 multi-boot PC's
Mainly HTPC/Office/Gen purpose (no gaming).
Trendnet USB KVM.
LG DVD burner/Blue Ray Player.
Tray system for removable SATA backup drives.

Not currently OCd, under-volted.
I use Hybrid sleep, rarely re-boot or shutdown.

Hauppauge HD-PVR, Avermedia PCIe TV Tuner, Hauppauge PCI TV Tuner.
Back
Top