Forum: Ruby on Rails How to run a background task in rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Zhao Y. (Guest)
on 2009-01-08 09:58
I need to run a background task which should last several hours. How can
I do this in rails?
Vishwanath N. (Guest)
on 2009-01-08 10:28
(Received via mailing list)
Hi,

What sort of tasks do you intend to do?
Database/ file system/ operating system oriented, appropriate approach
can
be decided depending on these

- NAYAK
Mukund (Guest)
on 2009-01-08 11:05
(Received via mailing list)
Use the backgroundrb system. It scales better in the long run as you
decide to do more stuff in the background and require better control.

http://backgroundrb.rubyforge.org/
Zhao Y. (Guest)
on 2009-01-08 11:07
Vishwanath Nayak wrote:
> Hi,
>
> What sort of tasks do you intend to do?
> Database/ file system/ operating system oriented, appropriate approach
> can
> be decided depending on these
>
> - NAYAK

The task is building source code with gcc.
MaD (Guest)
on 2009-01-08 11:16
(Received via mailing list)
> The task is building source code with gcc.
take a look at the earlier mentioned backgrounDRb:
http://backgroundrb.rubyforge.org/

[quote]
BackgrounDRb is a Ruby job server and scheduler. Its main intent is to
be used with Ruby on Rails applications for offloading long-running
tasks. Since a Rails application blocks while serving a request it is
best to move long-running tasks off into a background process that is
divorced from http request/response cycle.
[/quote]
Vishwanath N. (Guest)
on 2009-01-08 11:25
(Received via mailing list)
I second on it

-NAYAK
This topic is locked and can not be replied to.