While Windows doesn't put much emphasis on process relationships it does track if a child process has a parent. Use Process Explorer to view the process tree and see which of your scheduled tasks is creating all the child processes. If it is a single task then you just need to debug that one.
As to the cause the most common case is your parent process (the scheduled task) isn't properly cleaning up the script process. Since you didn't post that code we cannot guess what you're doing wrong. If it were .NET then I'd say you aren't closing the process handle. Alternatively perhaps the script process is causing an error and your app isn't handling that properly.
Yet another possible cause would be if the script is displaying some sort of prompt (either in error cases or running normally). In this case the process would stall waiting for user input that will never occur. If you have this occurring on a machine with Visual Studio installed then you can attach the debugger to the process and see where it is stuck at.