+ Post New Thread
Results 1 to 2 of 2
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 ...
  1. #1

    Join Date
    Apr 2007
    Thank Post
    Thanked 31 Times in 30 Posts
    Rep Power

    Question 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.



  2. #2

    Join Date
    Aug 2005
    Thank Post
    Thanked 529 Times in 452 Posts
    Blog Entries
    Rep Power
    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:

    pskill mytask.exe
    rem do more stuff
    rem now launch app

+ Post New Thread

Similar Threads

  1. [SCCM 2007] Suppressing Task Sequence notification icon on task bar?
    By Crispin in forum O/S Deployment
    Replies: 5
    Last Post: 19th February 2010, 11:34 AM
  2. Multiple rundll32 process running
    By freaky_seb in forum Windows
    Replies: 3
    Last Post: 19th June 2009, 02:05 PM
  3. Task scheduler error
    By Hacksawbob in forum Windows
    Replies: 0
    Last Post: 3rd March 2009, 01:52 PM
  4. adding a task to windows scheduler
    By timbo343 in forum Scripts
    Replies: 1
    Last Post: 3rd April 2007, 03:41 PM
  5. Replies: 4
    Last Post: 15th December 2006, 12:14 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts