Peter Van Hoecke
May 15, 2000, 2:35 AM
Post #1 of 2
I have got a serious problem here, and time is against me (big time!).
HEADS UP ladies and gentlemen!
I wrote a script for Win32 that launches several other tasks, including some none-Perl. When I start it manually, it works fine, but when I schedule it with the NT "at" statement, it goes wrong. The tricky part about the "at" statement is that you have to say to him to start a cmd-window to run the scripts, and because my script has to be fully automated I have to close the cmd window too (cfr /c ). For the rest is the at statement quit simple
at 13:00 cmd /c c:\perl\bin\perl.exe c:\scripts\myscript.pl
I suspect that by closing this window somehow my new processes are killed too! Even if I state in my script that the programs have to be detached processes. I use this command:
Win32::Process::Create($process, $path2executable, $executable, 0, DETACHED_PROCESS, "." );
I there a way to create processes that don’t get killed if the calling process is terminated (include his command window?) Should I use CREATE_NEW_CONSOLE or what?!?
I need the answer badly, and I need it fast. Become my friend for life and help me out here!
PS: I posted my question here (intermediate forum) because I hope that you guys have had experiences with this sort of problem…