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.
Bin L. (Guest)
on 2006-03-27 15:07
i want a daemon will check somthing every 10 minute
how do this in rails?
Alex Y. (Guest)
on 2006-03-27 16: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.
Thiago A. (Guest)
on 2006-03-27 17:10
(Received via mailing list)
On 3/27/06, bin liu <removed_email_address@domain.invalid> 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 A.
Berlin B. (Guest)
on 2006-03-27 18:09
(Received via mailing list)
Alex Y. 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 B.
(ramaza3 on freenode)
http://www.newspiritcompany.com
also checkout alpha version of botverse:
http://www.newspiritcompany.com:8086/universe_home
Bin L. (Guest)
on 2006-03-28 06:30
Alex Y. 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.