# Running a Perl script in the background

**URL:** <https://www.ruby-forum.com/t/running-a-perl-script-in-the-background/146858>\
**Category:** Rails\
**Created:** [August 26, 2008, 9:10am UTC](https://www.ruby-forum.com/t/running-a-perl-script-in-the-background/146858 "2008-08-26T09:10:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nitro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b5a626/32.png) [@Nitro](https://www.ruby-forum.com/u/Nitro)\
**Post date:** [August 26, 2008, 9:10am UTC](https://www.ruby-forum.com/t/running-a-perl-script-in-the-background/146858/1 "2008-08-26T09:10:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nitro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b5a626/32.png) [@Nitro](https://www.ruby-forum.com/u/Nitro)\
**Post date:** [August 26, 2008, 9:21am UTC](https://www.ruby-forum.com/t/running-a-perl-script-in-the-background/146858/2 "2008-08-26T09:21:21Z")

</div>

Hi Nitro,

You might want to try

system(“perl perlscript.pl &”)

or simply using BackgrounDRb.

HTH.

Regards  
Martin E.

* * *

Von: removed\_email\_address@domain.invalid 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
