Task Scheduler wait for action to complete

jonnyb

New member
Member
Local time
9:26 AM
Messages
37
Hi-

I am using Task Scheduler to run an .exe and then a .bat file at a scheduled time each day. However, the run time for the .exe process varies between seconds and hours and I need to be sure that the first process is finished before the second Action (.bat file) is initiated by Task Scheduler. Can this be done in Task Scheduler? Appreciate any suggestions.

Thanks,
JonnyB
 

My Computer

OS
Windows 7 64bit
CPU
Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz
Motherboard
Gigabyte Technology Co., Ltd. X58A-UD3R
Memory
24.00 GB
Graphics Card(s)
(1) ATI Radeon HD 4600 Series (2) LogMeIn Mirror Driver
Sound Card
(1) ATI High Definition Audio Device (2) Realtek High Defi
Monitor(s) Displays
Samsung SyncMaster XL2370HD
Hard Drives
(1) C300-CTFDDAC128MAG ATA Device (2) WDC WD6400AAKS-65Z7B0 ATA Device
PSU
OCZ StealthXStream2 600W ATX Power Supply
Case
Cooler Master RC-692-KKN2 CM690 II ATX Mid Tower
Cooling
Thermaltake Frio Overclocking-Ready 8mm Heatpipes 120mm Fans
Take a look at the scheduler. Are there any conditions that would cause the .exe to change times, ie. only if not used or only if user is logged on.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell XPS 420
OS
Windows 10, Home Clean Install
CPU
Intel Core2 processsor Q8200(2.33Ghz 1333FSB) Quad Core Tech
Motherboard
Dell
Memory
6 gb
Graphics Card(s)
ATI Radeon 256MB HD3650
Sound Card
Intergrated 7.1 Channel Audio
Monitor(s) Displays
Dell SP2009W 20"
Hard Drives
640 GB Serial ATA Hard drive
Cooling
Fan
Keyboard
Dell USB Keyboard
Mouse
Dell Premium Optical USB
Internet Speed
DSL 2.85
Why not combine them into a single batch file?

Code:
@ECHO OFF
start <path><filename>.exe
{Your original batch file}
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dwarf Dwf/11/2012 r09/2013
OS
Windows 8.1 Pro RTM x64
CPU
Intel Core-i5-3570K 4-core @ 3.4GHz (Ivy Bridge) (OC 4.4GHz)
Motherboard
ASRock Z77 Extreme4-M
Memory
4 x 4GB DDR3-1600 Corsair Vengeance CMZ8GX3M2A1600C9B (16GB)
Graphics Card(s)
MSI GeForce GTX770 Gaming OC 2GB
Sound Card
Realtek High Definition on board solution (ALC 898)
Monitor(s) Displays
ViewSonic VA1912w Widescreen (VGA)
Screen Resolution
1440x900
Hard Drives
OCZ Agility 3 SSD 120GB SATA III x2 (RAID 0)
Samsung HD501LJ 500GB SATA II x2
Hitachi HDS721010CLA332 1TB SATA II
Iomega 1.5TB Ext USB 2.0
WD 2.0TB Ext USB 3.0
PSU
XFX Pro Series 850W Semi-Modular
Case
Gigabyte IF233
Cooling
1 x 120mm Front Inlet 1 x 120mm Rear Exhaust
Keyboard
Microsoft Comfort Curve Keyboard 3000 (USB)
Mouse
Microsoft Comfort Mouse 3000 for Business (USB)
Internet Speed
NetGear DG834Gv3 ADSL Modem/Router (Ethernet) ~4.0 Mb/s (O2)
Antivirus
Avast! 8.0.1497
Browser
IE 11
Other Info
Optical Drive: HL-DT-ST BD-RE BH10LS30 SATA Bluray
Lexmark S305 Printer/Scanner/Copier (USB)
WEI Score: 8.1/8.1/8.5/8.5/8.25
Asus Eee PC 1011PX Netbook (Windows 7 x86 Starter)
Thanks for the replies.

Richc46 - I'm not sure that I follow you perfectly, but I don't believe there are any of those conditions present.

Dwarf - I think that makes the most sense, but I have two arguments that i supply the .exe from the "Add Arguments" task scheduler field and I'm not sure how to pass them if I use a batch file.

The arguments are: autoupdate=1 autoclose=1

Here is what I have so far for code in the new .bat file...if anyone has suggestions on how to get the above arguments to the DataUpdater.exe I would appreciate it.
Code:
cd C:\TrApps\
start /wait DataUpdater.exe
 
cd C:\Desktop\
start RunABAuto.bat
Thanks again for your help.
 

My Computer

OS
Windows 7 64bit
CPU
Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz
Motherboard
Gigabyte Technology Co., Ltd. X58A-UD3R
Memory
24.00 GB
Graphics Card(s)
(1) ATI Radeon HD 4600 Series (2) LogMeIn Mirror Driver
Sound Card
(1) ATI High Definition Audio Device (2) Realtek High Defi
Monitor(s) Displays
Samsung SyncMaster XL2370HD
Hard Drives
(1) C300-CTFDDAC128MAG ATA Device (2) WDC WD6400AAKS-65Z7B0 ATA Device
PSU
OCZ StealthXStream2 600W ATX Power Supply
Case
Cooler Master RC-692-KKN2 CM690 II ATX Mid Tower
Cooling
Thermaltake Frio Overclocking-Ready 8mm Heatpipes 120mm Fans
I'll have a look at this, and report back later. I'm sure that there is a way to link 2 or more scheduled tasks in such a way that the completion of one automatically starts the second (and so on).
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dwarf Dwf/11/2012 r09/2013
OS
Windows 8.1 Pro RTM x64
CPU
Intel Core-i5-3570K 4-core @ 3.4GHz (Ivy Bridge) (OC 4.4GHz)
Motherboard
ASRock Z77 Extreme4-M
Memory
4 x 4GB DDR3-1600 Corsair Vengeance CMZ8GX3M2A1600C9B (16GB)
Graphics Card(s)
MSI GeForce GTX770 Gaming OC 2GB
Sound Card
Realtek High Definition on board solution (ALC 898)
Monitor(s) Displays
ViewSonic VA1912w Widescreen (VGA)
Screen Resolution
1440x900
Hard Drives
OCZ Agility 3 SSD 120GB SATA III x2 (RAID 0)
Samsung HD501LJ 500GB SATA II x2
Hitachi HDS721010CLA332 1TB SATA II
Iomega 1.5TB Ext USB 2.0
WD 2.0TB Ext USB 3.0
PSU
XFX Pro Series 850W Semi-Modular
Case
Gigabyte IF233
Cooling
1 x 120mm Front Inlet 1 x 120mm Rear Exhaust
Keyboard
Microsoft Comfort Curve Keyboard 3000 (USB)
Mouse
Microsoft Comfort Mouse 3000 for Business (USB)
Internet Speed
NetGear DG834Gv3 ADSL Modem/Router (Ethernet) ~4.0 Mb/s (O2)
Antivirus
Avast! 8.0.1497
Browser
IE 11
Other Info
Optical Drive: HL-DT-ST BD-RE BH10LS30 SATA Bluray
Lexmark S305 Printer/Scanner/Copier (USB)
WEI Score: 8.1/8.1/8.5/8.5/8.25
Asus Eee PC 1011PX Netbook (Windows 7 x86 Starter)
Sounds good Dwarf...thanks again for your help with this.
 

My Computer

OS
Windows 7 64bit
CPU
Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz
Motherboard
Gigabyte Technology Co., Ltd. X58A-UD3R
Memory
24.00 GB
Graphics Card(s)
(1) ATI Radeon HD 4600 Series (2) LogMeIn Mirror Driver
Sound Card
(1) ATI High Definition Audio Device (2) Realtek High Defi
Monitor(s) Displays
Samsung SyncMaster XL2370HD
Hard Drives
(1) C300-CTFDDAC128MAG ATA Device (2) WDC WD6400AAKS-65Z7B0 ATA Device
PSU
OCZ StealthXStream2 600W ATX Power Supply
Case
Cooler Master RC-692-KKN2 CM690 II ATX Mid Tower
Cooling
Thermaltake Frio Overclocking-Ready 8mm Heatpipes 120mm Fans
Back
Top