Tech Support banner

Status
Not open for further replies.
1 - 11 of 11 Posts

·
Registered
Joined
·
5 Posts
Discussion Starter #1
I've tried to figure out how to stop processes at scheduled times. I've tried to use taskkill by typing " taskkill /fi "CPUTime hh:mm:ss" /pid xx " in cmd but the response from taskkill is always "acces denied" (my account have administrator privileges).
 

·
Registered
Joined
·
1,097 Posts
You can use the "at" command to schedule tasks from the command line. For example, the time is now 5:16 PM. If I wanted to close notepad at 5:20 PM, I would schedule a task by issuing the following commad...

at 05:16PM taskkill /F /IM notepad.exe

For more information on the "at" command, type at /? at a command prompt.
 

·
Registered
Joined
·
610 Posts
Can you run the kill command without the time specified? If you can i would make a shortcut with only the kill command, and use scheduled tasks to run it.
 

·
Registered
Joined
·
5 Posts
Discussion Starter #4
Well, my problem is taskkill saying "access denied"...also I tried the "at" command and it said that it scheduled it but nothing happens at the scheduled time.
There must be other programs out there (loads of them) that does this...does anybody know of any (that are free) ?
 

·
Registered
Joined
·
1,097 Posts
Forakh said:
also I tried the "at" command and it said that it scheduled it but nothing happens at the scheduled time.
Just tell us what exactly are you trying to do, at what time(s), and to what program.
 

·
Registered
Joined
·
5 Posts
Discussion Starter #6
I want to make winamp or other programs shut down at scheduled times.
I've tried
taskkill /fi "CPUTime 02:30:00" /pid 6932
and gotten the response "access denied".
Also I've tried
at 02:30PM taskkill /pid 6932
and gotten the response "new task created with ID: 1" (or something like that) but when the scheduled time comes nothing happens.
 

·
Registered
Joined
·
1,097 Posts
Is it necessary for you to use the PID? PID's change everytime you open and close a program. I wouldn't rely on the PID unless you wanted to create a one-time schedule for a running process. Forget the PID, and use the process name...

at 02:30PM taskkill /F /IM winamp.exe

If you wanted to do this daily, I believe the command would be...

at 02:30PM /every: taskkill /F /IM winamp.exe
 

·
Registered
Joined
·
5 Posts
Discussion Starter #8
PID:s or IM:s are not the problem, the problem is the I get "access denied" when using the command taskkill, which also means that the scheduler "at" can't get access either. I get the same result using /pid and /im.
Besides, using "at" might not be necessary since there's supposed to be a "CPUTime"-filter in the taskkill command to schedule stuff.
 

·
Registered
Joined
·
1 Posts
The reason everyone is getting "Access denied" is because you need to run the command prompt (cmd.exe) in Administrator mode, that is if you're using Vista in my case.
 
1 - 11 of 11 Posts
Status
Not open for further replies.
Top