in reply to Re: Re: running another script without waiting
in thread running another script without waiting
I haven't tested the code, but I believe if you do something along the line, it should work.foreach $url ( @scheduled_jobs ) { my $ua = new LWP::UserAgent; my $req = new HTTP::Request GET => $url; my $pid = fork(); if ($pid == 0) { # in the child my $res = $ua->request($req); exit(0); } # in the parent, carry on with next job... }
|
|---|