title: Optimize ruby bot for heroku
body: <p>Currently I have a ruby on rails bot that calls a method in the view and runs that method as a infinite loop and that is how the bot continues its actions indefinitely. At the end of the loop there is a delay for 2 hours or so where it sleeps. Currently I have a few problems:</p>
  
  <p>1) I can't run this bot forever because it never loads a page since its running the infinite loop and heroku has a 30 second time-out policy you can't change.</p>
  
  <p>2) I can fix this by making the method run on a worker dyno. But the method I am using with sleep causes the dyno to run continuously. </p>
  
  <p>The question is: Is there a way to structure my app on heroku so that it has a delay that doesn't use the dyno hours? I want to be able to continue to automatically run the bot in some fashion on two dynos (1 web and 1 worker) and still stay within the 750 free hours allotted by heroku. Any help is greatly appreciate!</p>