Re: Running an external process, not waiting for a return, and obtaining its PID

[email protected] ("Mike A. Leonetti")
Newsgroups perl.win32.vanilla
Message-ID <[email protected]>
On 05/06/10 12:51, David Golden wrote:
> On Thu, May 6, 2010 at 12:36 PM, Mike A. Leonetti
> <[email protected]> wrote:
>   
>> I need to rerun an external process every 5 minutes and destroy the old one.
>>
>> The only way I can think of doing that is by running the external
>> process, not waiting for its output, obtaining the PID, and then
>> sleeping for 5 minutes before killing the process.
>>
>> What might be the best way of doing either?
>>     
> I'd use Win32::Job for it.  You can spawn a command as a separate
> process, run it for 5 minutes, then kill it and repeat.  Much easier
> than messing with PID and such.
>
> David
>   
That work beautifully.  Thanks.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.