Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduled task not being shut down at end of period

Status
Not open for further replies.

RonPro

Programmer
Apr 10, 2002
74
US
I have a small integration app running on Server 2003 via scheduled tasks. It needs to be active most of the day, but I need to have it shut down when needed.

I have tried setting the schedule task 'If the task is still running, stop it at this time' option. From what I've seen about that option, it should shut the program down when the end time given for the task has has passed - yes?

But the program does not shut down.

Do I misunderstand what that checkbox means? Or is there something not right about this option?
 
if you have a set time you want it closed at, try this batch, schedual the time to run the batch and it will close the program/file

TASKKILL /F /IM "FILE.EXE"

i use it to kill outlook sessions during maintenance periods.....GL

Life is not a journey to the grave with the intention
of arriving safely in a pretty and well preserved body,
but rather to skid in broadside, thoroughly used up,
totally worn out, and loudly proclaiming

--"WOW-- What a Ride!"
 
Where/what is TASKKILL?? System just says it is not recognized as an internal or external command, operable program or batch file.

 
if you look at the task manager under processes, you will need to figure out what process "program" it is, this is what you will put in the place of "file.exe"

so for example if you have out look open you will see the process "outlook.exe" if that is the case you would create a batch file and it would look like this

TASKKILL /F /IM OUTLOOK.EXE

when you run this it will kill ALL sessions of outlook running on your computer.



Life is not a journey to the grave with the intention
of arriving safely in a pretty and well preserved body,
but rather to skid in broadside, thoroughly used up,
totally worn out, and loudly proclaiming

--"WOW-- What a Ride!"
 
I know - please re-read my question. Its balking at the "TASKKILL" call. I realized that program.exe is my exe.
 
taskkill-

found in the C:\windows\system32 folder

taskkill.exe (dos command)

you will also find taskkill.ex_ in the C:\I386 folder

it is used to kill running applications found in the task manager


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top