Hello everyone, I have to develop a cronjob in my app, it should run automatically every 2 hours, is there a way of doing it simply creating a rake task? I don'' t know how could I set the interval time for it. Do you know? Please help! Rodrigo Alves Vieira http://rodrigo3n.com -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Rodrigo, Why don''t you just use cron? Bill On Mon, Oct 4, 2010 at 1:22 PM, rodrigo3n <rodrigo3n-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello everyone, I have to develop a cronjob in my app, it should run > automatically every 2 hours, is there a way of doing it simply > creating a rake task? I don'' t know how could I set the interval time > for it. Do you know? Please help! > > Rodrigo Alves Vieira > > http://rodrigo3n.com > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Try looking into delayed_job. It has lots of flexibility yet is pretty easy to use. On Oct 4, 2:22 pm, rodrigo3n <rodrig...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello everyone, I have to develop a cronjob in my app, it should run > automatically every 2 hours, is there a way of doing it simply > creating a rake task? I don'' t know how could I set the interval time > for it. Do you know? Please help! > > Rodrigo Alves Vieira > > http://rodrigo3n.com-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I recommend resque. http://github.com/defunkt/resque 2010/10/4 rodrigo3n <rodrigo3n-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> Hello everyone, I have to develop a cronjob in my app, it should run > automatically every 2 hours, is there a way of doing it simply > creating a rake task? I don'' t know how could I set the interval time > for it. Do you know? Please help! > > Rodrigo Alves Vieira > > http://rodrigo3n.com > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Frederico Macêdo de Assunção (62) 8464-7107 http://setalabs.com.br -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 10/4/10, rodrigo3n <rodrigo3n-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello everyone, I have to develop a cronjob in my app, it should run > automatically every 2 hours, is there a way of doing it simply > creating a rake task? I don'' t know how could I set the interval time > for it. Do you know? Please help!Hi Rodrigo, Have a look here http://github.com/javan/whenever and also check this http://railscasts.com/episodes/164-cron-in-ruby All the best, Fidel. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.