Software to schedule a program to start and terminate?

Soldato
Joined
27 Jan 2005
Posts
3,655
Location
Expat in HK
I know Windows Scheduler can start a program, but as far as i'm aware it can't terminated them at a certain time. Anyone know of any that will do this function?
 
Maybe it can if you send the program the correct shutdown switches via a command prompt.
 
would have thought Windows Scheduler with a few .BAT files would be fine. Dpends on what you want started and stopped.

If this is for internet use then something like Netlimitor can stop access from a program on time constraints accessing the interenet.
 
As i have no idea about MS-DOS or the CMD prompt, can a BAT file really be able to kill a process every day at a certain point in time?
 
Yes, using those Sysinternal command line programs (see ^^^^)

"pskill iexplore.exe" will stop Internet Explorer, you write that into a BAT file and schedule it using Windwos Scheduler
 
seems so. anyway all your looking at is a fancy GUI front end for cmd commands for he most part.

The ability to perform tasks from a system's command line allows those tasks to be used in batch files. This recipe describes several uses of taskkill to terminate Windows processes.

If you know the name of a process to kill, for example notepad.exe, use the following command from a command prompt to end it:

taskkill /IM notepad.exe


This will cause the program to terminate gracefully, asking for confirmation if there are unsaved changes. To forcefully kill the same process, add the /F option to the command line. Be careful with the /F option as it will terminate all matching processes without confirmation.

To kill a single instance of a process, specify its process id (PID). For example, if the desired process has a PID of 827, use the following command to kill it:

taskkill /PID 827


Using filters, a variety of different patterns can be used to specify the processes to kill. For example, the following filter syntax will forcefully kill all processes owned by the user Quinn:

taskkill /F /FI "USERNAME eq Quinn"


The following table shows the available filters and their use.
Code:
Filter Name   Valid Operators     Valid Value(s)
-----------   ---------------     --------------
STATUS        eq ne               RUNNING | NOT RESPONDING
IMAGENAME     eq ne               Image name
PID           eq ne gt lt ge le   PID value
SESSION       eq ne gt lt ge le   Session number.
CPUTIME       eq ne gt lt ge le   CPU time in the format
                                  of hh:mm:ss.
MEMUSAGE      eq ne gt lt ge le   Memory usage in KB
USERNAME      eq ne               User name in [domain\]user
                                        format
MODULES       eq ne               DLL name
SERVICES      eq ne               Service name
WINDOWTITLE   eq ne               Window title

   eq: equals                 ne: not equal
   gt: greater than           lt: less than
   gt: greater than or equal  le: less than or equal

I've not used it before so cant vouch for it.

http://www.tech-recipes.com/windows_tips446.html
http://www.expresscomputeronline.com/20040823/techspace01.shtml
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cmd.mspx?mfr=true

start - run - cmd.exe
start /?
 
Great! Where do i add the command line though? I have the executable of the program i want to kill on my desktop as well as the pkill.exe?
 
hoy hoy.

Right.

Creat a net .txt file some were call it start and then open it in the text file type : start C:\Documents and Settings\emo_hug\Desktop\.exe name

save and close this file rename the extension to .bat

create another .txt file and all it stop. Open the file and type : taskkill /F /IM "name of the tak as it appears in task manager" (/f forces the app to close)

Just looking at the schedualer there are some options to terminate the program if its still running.
 
Back
Top Bottom