Windows schedule (vista)

Soldato
Joined
17 Mar 2004
Posts
8,259
I need to run a program between the hours of 11pm and 6pm the following day on a daily basis. Using Windows Scheduler (Vista) I can get the program to open, but cannot get the program to close (stop) at a predefined time.

I know you can use the shutdown function in Windows which restarts my PC e.g. C:\Windows\System32\shutdown.exe -f which will close all programs etc but is there a way to do the following by means of a switch on a duplicate shortcut to the program

ProgramA.exe opens 11PM
ProgramA.exe closes with the above function i.e. -f? program closes 6PM

Does this make sence, or is windows scheduler only capable of opening a program and not closing it at a predefined time?
 
I don't thing it can close programs. You could get a copy of pskill and use that to kill the application process.

TrUz
 
Create a bat file to stop the application and have shceduler run that when you want the app to stop?

Dunno if that is possible though.
 
Fanatic said:
Create a bat file to stop the application and have shceduler run that when you want the app to stop?

Dunno if that is possible though.
It is possible to create a Batch file to kill the application but you will need something like pskill too so you can pass in the program you want to kill.

TrUz
 
@Echo off
taskkill /F /IM APP.EXE


that in a bat file will kill it,

or just go right click > properties on the task > Settings tab > and tick "stop task if it rungs longer than x amount of time"

sorted


ta

alec
 
Back
Top Bottom