Running a Perl script in the background

Hi,
As part of my Rails Application I want the users to be able to start/
stop a perl script in the background… Currently I’ve tried cals
like:
system(“perl perl_script.pl”)
or
perl perl_script.pl

But I believe the server is actually waiting for the task to end… Is
there any way to run a task in the background?

Thanks,
Nitro

Hi Nitro,

You might want to try

system(“perl perlscript.pl &”)

or simply using BackgrounDRb.

HTH.

Regards
Martin E.


Von: [email protected] im Auftrag von Nitro
Gesendet: Di 26.08.2008 03:52
An: Ruby on Rails: Talk
Betreff: [Rails] Running a Perl script in the background

Hi,
As part of my Rails Application I want the users to be able to start/
stop a perl script in the background… Currently I’ve tried cals
like:
system(“perl perl_script.pl”)
or
perl perl_script.pl

But I believe the server is actually waiting for the task to end… Is
there any way to run a task in the background?

Thanks,
Nitro

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs