Running a background task/thread in rails?


#1

Hi, I am new to ruby and to rails, but I like what I see so far. I have
been working on a web app in java (servlets and JSPs) that, based on a
request from the user, kicks off a thread in the background to perform a
task (puts messages in an MQSeries queue). The thread object is stored
in the session and I then allow the user to control the task from the
browser(like stop it).

Is the same thing possible/easy to do in rails? I searched but couldn’t
find quite what I am looking for. If someone can point me in the right
direction, that would be great.

Thanks in advance,
eching


#2

Eric Ching wrote:

Hi, I am new to ruby and to rails, but I like what I see so far. I have
been working on a web app in java (servlets and JSPs) that, based on a
request from the user, kicks off a thread in the background to perform a
task (puts messages in an MQSeries queue). The thread object is stored
in the session and I then allow the user to control the task from the
browser(like stop it).

Is the same thing possible/easy to do in rails? I searched but couldn’t
find quite what I am looking for. If someone can point me in the right
direction, that would be great.

Thanks in advance,
eching

Check this link:
http://kylemaxwell.com/articles/2006/01/06/railscron-0-1

and the svn:
http://dev.kylemaxwell.com/repository/browse/rails_cron/trunk


#3

Check this link:
http://kylemaxwell.com/articles/2006/01/06/railscron-0-1

and the svn:
http://dev.kylemaxwell.com/repository/browse/rails_cron/trunk

Excellent! Looks about what I need. Thanks for the links.