title: whenever used to execute a method rails 4
body: <p>I'm attempting to use the whenever to execute a method every 30 minutes. However I'm having some trouble setting it up.</p>
  
  <p>schedule.rb</p>
  
  <pre><code>every 1.minutes do
      runner "Post.winner"
  end
  </code></pre>
  
  <p>post.rb</p>
  
  <pre><code>class Post &lt; ActiveRecord::Base
  
  module Post
      def winner
          #do some stuff that saves a new value in database
  </code></pre>
  
  <p>I don't think the runner is working because the field that I save a value to still shows up as nil in the console.</p>