Thanks!

I can think of a few ways to write a script with a continous loop.
Just wondering though if there is a straight forward way to do it.

The one way I can think of is to have a integer that is the index of
the record in the DB and then just reset it when it hits the number of
records in the DB.

On Apr 21, 11:00 am, Stephan Wehner <[email protected]> wrote:
> On Apr 21, 7:17 am, "tashfeen.ekram" <[email protected]> wrote:
>
> > Actually, I am interested in the former. That is, scan table and once
> > it is done start form the top again and scan again without any delay.
>
> http://cr.yp.to/daemontools.htmlshould help (on Unix).
>
> Your Ruby script has an endless loop. daemontools comes in to start it
> initially,  or if the script fails, or for you to start/stop .
>
> Stephan
>
>
>
>
>
> > Thanks for the resource.
>
> > On Apr 21, 8:25 am, Peter Hickman <[email protected]>
> > wrote:
>
> > > By continuously do you mean 'scan table, scan table, scan table ...' or
> > > 'scan table, wait for 10 minutes, repeat'
>
> > > If it is the latter then you could simply set up a cron job to run every 
> > > few
> > > minutes.
>
> > > Here's some details on how you might do it
>
> > >http://peter-hickman.blogspot.com/2009/09/rake-task-to-install-crons....
>
> > >http://peter-hickman.blogspot.com/2009/11/crons-for-rails.html
>
> > > This sort of thing occurs a few times in my blog.
>
> > > Hope it might be of help.
>
> > > Of course this assumes that you are running on *nix or OSX
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "Ruby on Rails: Talk" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to 
> > > [email protected].
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/rubyonrails-talk?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Ruby on Rails: Talk" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/rubyonrails-talk?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to