title: Rails - Whenever gem - Dynamic values
body: <p>Lets say I have a cronjob like this:</p>
  
  <pre><code>every 1.day, :at =&gt; '4:30 am' do  
    runner "MyModel.task_to_run_at_four_thirty_in_the_morning"  
  end  
  </code></pre>
  
  <p>Although, I would like to make '1.day' more dynamic, such as changing the value via a form in an administration page.</p>
  
  <p>Then it could look like this:</p>
  
  <pre><code>every Constant.find(2).value, :at =&gt; '4:30 am' do 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>@const = Constant.find(2)
  every @const.span, :at =&gt; @const.time do 
  </code></pre>
  
  <p>Can anyone come up with an idea on how to make this work?</p>
  
  <p>Obviously, the reason for this would be that I could use the values stored in the database on my site, like an message saying</p>
  
  <pre><code>&lt;%= "The next update is in less than #{@const.time}" #or something similar %&gt;
  </code></pre>