Windows Server 2000/2003 Thread, Task Scheduler and running process in Technical; We've got 2 tasks setup on one of our server to send data to one of our partners. Frequently when ...
13th April 2010, 09:05 PM #1
Task Scheduler and running process
We've got 2 tasks setup on one of our server to send data to one of our partners. Frequently when task runs it completes with a last result code of 0x0 (sucessful) but the process it calls (through a batch file) continues to run after the task ends. This then causes a problem when it runs again and it generates errors about the fact that the process is already running, checked task manager and indeed it is.
I've spoken to the vendor of the app (who is also the partner we are sending data to) and they have asked me to change the "stop the task if it runs for x hours x miniutes" to 15 minutes. I don't think the problem is related to the task scheduler but I'm wondering if anybody else has seen something like this happen just incase it is a windows bug of some sort.
IDG Tech News
13th April 2010, 09:42 PM #2
is the batch file just launching an exe file? If so, I'd guess the batch file is terminating pretty much immediately but the exe is left running. If this is the case then even setting the "stop task if it runs for more than 15 minutes" won't help - I'm pretty sure that task scheduler will look to kill the batch file, not the process it spawned.
If you just run the exe file, does it quit cleanly once it's done its work? If not, then that's the problem and that needs to be fixed (eg If the exe file does its stuff but then just sits there waiting for someone to click "exit")
You could probably use pskill at the start of the batch file - eg if the process is called mytask.exe then you would have something like:
rem do more stuff
rem now launch app
By Crispin in forum O/S Deployment
Last Post: 19th February 2010, 12:34 PM
By freaky_seb in forum Windows
Last Post: 19th June 2009, 03:05 PM
By Hacksawbob in forum Windows
Last Post: 3rd March 2009, 02:52 PM
By timbo343 in forum Scripts
Last Post: 3rd April 2007, 04:41 PM
By sidewinder in forum Windows
Last Post: 15th December 2006, 01:14 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread