title: python - Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
body: <p>I am deploying a python script at <code>heroku</code>, which will make a request to another server after every <code>3 minutes</code>. </p>
  
  <p>Deployment is going good but when i see the <code>logs</code>, I got these <code>errors</code>.</p>
  
  <pre><code>2016-11-01T07:42:12.919755+00:00 heroku[web.1]: Starting process with command `python script.py --log-file -`
  2016-11-01T07:43:13.097413+00:00 heroku[web.1]: Error R10 (Boot timeout) -&gt; Web process failed to bind to $PORT within 60 seconds of launch
  2016-11-01T07:43:13.097556+00:00 heroku[web.1]: Stopping process with SIGKILL
  2016-11-01T07:43:13.196156+00:00 heroku[web.1]: Process exited with status 137
  2016-11-01T07:43:13.212942+00:00 heroku[web.1]: State changed from starting to crashed
  2016-11-01T07:43:13.213858+00:00 heroku[web.1]: State changed from crashed to starting
  2016-11-01T07:43:16.719828+00:00 heroku[web.1]: Starting process with command `python script.py --log-file -`
  2016-11-01T07:44:17.215381+00:00 heroku[web.1]: Error R10 (Boot timeout) -&gt; Web process failed to bind to $PORT within 60 seconds of launch
  2016-11-01T07:44:17.215381+00:00 heroku[web.1]: Stopping process with SIGKILL
  2016-11-01T07:44:17.364708+00:00 heroku[web.1]: Process exited with status 137
  2016-11-01T07:44:17.367610+00:00 heroku[web.1]: State changed from starting to crashed 
  </code></pre>
  
  <p><code>Procfile</code></p>
  
  <pre><code>web: python script.py --log-file -
  </code></pre>
  
  <p><code>script.py</code></p>
  
  <pre><code>import sys
  import requests
  from apscheduler.schedulers.blocking import BlockingScheduler
  
  sched = BlockingScheduler()
  
  @sched.scheduled_job('interval', minutes=3)
  def timed_job():
      try:
          request = requests.get(url='https://royal-tag-services.herokuapp.com/api/sms-service/scheduler/')
      except Exception as e:
          print &gt;&gt;sys.stderr, 'scheduler request failed'
  
  sched.start()
  </code></pre>
  
  <p><code>Result of 'tree -L 1' command</code></p>
  
  <pre><code>├── Procfile
  ├── requirements.txt
  ├── script.py
  └── supporterenv
  </code></pre>