title: Python Twitter Bot w/ Heroku Error: R10 Boot Timeout
body: <p>I have developed a simple python twitter bot which periodically executes various functions using the following libraries:</p>
  
  <pre><code>TwitterFollowBot==2.0.2
  schedule==0.3.2
  </code></pre>
  
  <p>The application works fine when I execute it on my computer, and I wanted to migrate it to Heroku so it could run independently. Upon executing it on Heroku it works as it should for 60 seconds before timing out:</p>
  
  <p><code>Error R10 (Boot timeout) -&gt; Web process failed to bind to $PORT within 60 seconds of launch</code></p>
  
  <p>After researching this, I found out that Heroku dynamically switches ports and my application must continuously specify which port it should run on. From another thread I read that a possible solution required me to alter my Procfile, so I appended the PORT variable to the end:</p>
  
  <p><strong>Procfile</strong>: <code>web: python app.py $PORT</code></p>
  
  <p>This had no effect so I tried it again with <code>${PORT}</code>,<br>
  And I also tried switching <code>web:</code> with <code>bot:</code> (which stopped my application from executing properly)</p>
  
  <p>I found other solutions to this issue which worked for node, or python applications using Django, Flask, etc... However, I was unable to find a solution for just a simple .py application. Is this even possible? Or should I create my app with Flask and attempt one of the other fixes?</p>