rubyonrailsin

A Ruby and Rails talk

Thursday, April 1, 2010


[Rails] questions rufus scheduler

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

Hello people,
I am using Rufus scheduler to send emails every day at 4am. To do this I
am using:

scheduler = Rufus::Scheduler.start_new
scheduler.every '1d', :first_at => '2010/04/1 04:30' do
#do something
end

There is a better way to write this schedule ?


By the way, I placed this code at config/environments/production.rb, but
don't seems to me that is the correct place. Is this the best way to go
?
--
Posted via http://www.ruby-forum.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@googlegroups.com.
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.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive