Running Perl script without a command window
I'm running a perl script that checks the viability of a server. I have the script scheduled to run every 5 minutes. That means every five minutes I have a command window flash on the computer as the script is being run. Is there any way to keep this command window from comming up? The script sends an email if there is server failure so I don't need to see any direct output from the script. Thanks in advance for your answers. - Dan. -- This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. To reply to our email administrator directly, send an email to [EMAIL PROTECTED] ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Running Perl script without a command window
Dan wrote: I'm running a perl script that checks the viability of a server. I have the script scheduled to run every 5 minutes. That means every five minutes I have a command window flash on the computer as the script is being run. Is there any way to keep this command window from comming up? The script sends an email if there is server failure so I don't need to see any direct output from the script. Thanks in advance for your answers. - Dan. use wperl. I set .plw files to execute with wperl.exe instead of perl.exe. Keeps the black eye away. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Running Perl script without a command window
[EMAIL PROTECTED] wrote: I'm running a perl script that checks the viability of a server. I have the script scheduled to run every 5 minutes. That means every five minutes I have a command window flash on the computer as the script is being run. Is there any way to keep this command window from comming up? The script sends an email if there is server failure so I don't need to see any direct output from the script. How are you running this script: Scheduler or ?? Wags ;) Thanks in advance for your answers. - Dan. *** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. *** ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Running Perl script without a command window
On 4/14/05, Dan Baumbach [EMAIL PROTECTED] wrote: I'm running a perl script that checks the viability of a server. I have the script scheduled to run every 5 minutes. That means every five minutes I have a command window flash on the computer as the script is being run. Is there any way to keep this command window from comming up? The script sends an email if there is server failure so I don't need to see any direct output from the script. Thanks in advance for your answers. - Dan. Hi Dan! Try this; use Win32::OLE; [---] my($sysCmd) = cmd.exe /c mypgm.exe; Win32::SetChildShowWindow(0); ## make the DOS window invisible system($sysCmd); HTH- kevdot ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Running Perl script without a command window
- Original Message - From: Kevin Carothers [EMAIL PROTECTED] To: Dan Baumbach [EMAIL PROTECTED] Cc: perl-win32-users@listserv.ActiveState.com Sent: Thursday, April 14, 2005 3:49 PM Subject: Re: Running Perl script without a command window On 4/14/05, Dan Baumbach [EMAIL PROTECTED] wrote: I'm running a perl script that checks the viability of a server. I have the script scheduled to run every 5 minutes. That means every five minutes I have a command window flash on the computer as the script is being run. Is there any way to keep this command window from comming up? The script sends an email if there is server failure so I don't need to see any direct output from the script. Thanks in advance for your answers. - Dan. Hi Dan! Try this; use Win32::OLE; [---] my($sysCmd) = cmd.exe /c mypgm.exe; Win32::SetChildShowWindow(0); ## make the DOS window invisible system($sysCmd); HTH- kevdot Interesting. Are you running it on the server's console, or via scheduled task? I've got a number of Perl scripts running on my server via scheduled tasks, and they never flash any command windows on the screen. At least, none that I see :-). Brian ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Running Perl script without a command window
On Thu, 14 Apr 2005, Kevin Carothers wrote: On 4/14/05, Dan Baumbach [EMAIL PROTECTED] wrote: I'm running a perl script that checks the viability of a server. I have the script scheduled to run every 5 minutes. That means every five minutes I have a command window flash on the computer as the script is being run. Is there any way to keep this command window from comming up? The script sends an email if there is server failure so I don't need to see any direct output from the script. Thanks in advance for your answers. - Dan. Hi Dan! Try this; use Win32::OLE; You don't need Win32::OLE for Win32::SetChildShowWindow(). [---] my($sysCmd) = cmd.exe /c mypgm.exe; Win32::SetChildShowWindow(0); ## make the DOS window invisible system($sysCmd); That works to suppress command windows for child processes. To suppress the command window of the perl program itself, just run it via wperl.exe instead of perl.exe. Cheers, -Jan ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs