Forum: Ruby on Rails How to create a daemon in a rails app

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.
7cb76462b14f77622b0eba843d466060?d=identicon&s=25 Bin Liu (liubin)
on 2006-03-27 13:07
i want a daemon will check somthing every 10 minute
how do this in rails?
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-03-27 14:07
(Received via mailing list)
bin liu wrote:
> i want a daemon will check somthing every 10 minute
> how do this in rails?
Rails_cron, or script/runner.  Google is your friend.
B1d59a804bd67487c964bc505a8eb892?d=identicon&s=25 Thiago Arrais (Guest)
on 2006-03-27 15:10
(Received via mailing list)
On 3/27/06, bin liu <liubin@necas.nec.com.cn> wrote:
> i want a daemon will check somthing every 10 minute
> how do this in rails?

I have exactly the same thing. You can search the list archives for my
discussion with Kyle and Francois about it. Try: "periodic updater"

If you need some example code, maybe you'd like to take a look at the
code on the SVN repo at http://svn.berlios.de/svnroot/repos/motiro

Cheers,

Thiago Arrais
A8e90e6f310e36963dfd432a66e2e558?d=identicon&s=25 Berlin Brown (Guest)
on 2006-03-27 16:09
(Received via mailing list)
Alex Young wrote:

> bin liu wrote:
>
>> i want a daemon will check somthing every 10 minute
>> how do this in rails?
>
> Rails_cron, or script/runner.  Google is your friend.
>
Yea, I was thinking about adding a cron job to script/runner.  Or even
not script/runner.  But you can create a simple script
that loads the Rails environment.  I  mention that because I couldnt
tell if my scripts were loaded properly through runner.

For example (most of the script, no runner used):

require File.dirname(__FILE__) + '/../../config/environment'
ctr = 0
# Iterate through the user links
# and extract the various keywords.
for link in UserLink.find(:all)
end

--
Berlin Brown
(ramaza3 on freenode)
http://www.newspiritcompany.com
also checkout alpha version of botverse:
http://www.newspiritcompany.com:8086/universe_home
7cb76462b14f77622b0eba843d466060?d=identicon&s=25 Bin Liu (liubin)
on 2006-03-28 04:30
Alex Young wrote:
> bin liu wrote:
>> i want a daemon will check somthing every 10 minute
>> how do this in rails?
> Rails_cron, or script/runner.  Google is your friend.

sorry ,i can not access google/gmail/group
This topic is locked and can not be replied to.