Tuesday, July 9, 2013

[Rails] whenever gem

Hello All,

I want to schedule a mail every day.
I used whenever gem. 

I added gem 'whenever' in my gemfile. Then in the terminal I did - "whenever ." which created a schedule.rb.

In schedule.rd I added this piece of code:- 

set :environment, "development"

every 2.minutes do
  runner "UserMailer.some_method"
end

Does it get invoked automatically ?
or do I need to do something to invoke it?

Thanks,
Avi

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1ef570b4-7422-4b40-b965-9a46be791a7e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate