title: No handlers could be found for logger "apscheduler.executors.default"?
body: <p>I have a python script being run via a nightly job on Heroku. Every once in a while (and lately, a lot more), the script fails to execute due to the below error.</p>
  
  <pre><code>2015-02-25T05:00:02.671242+00:00 app[clock.1]: No handlers could be found for logger "apscheduler.executors.default"
  </code></pre>
  
  <p>The script is executed using the inbuilt clock method as defined in my Procfile.</p>
  
  <p>clock.py:</p>
  
  <pre><code>import sys
  import logging
  
  sys.path.append('main')
  
  from main import main
  from apscheduler.schedulers.blocking import BlockingScheduler
  
  sched = BlockingScheduler()
  
  # Executes every night at 5:00am UTC time | 12:00am (midnight) Winston-Salem, NC time
  @sched.scheduled_job('cron', hour=5)
  def scheduled_job():
      logging.basicConfig()
      main()
  
  sched.start()
  </code></pre>
  
  <p>I've searched the web and based on the few responses I've read, people say this is a warning as opposed to an error. However, this problem causes the entire script to fail when it does happen. My question is first, <b>is there a fix for this?</b> And secondly, why does this happen sometimes and not <i>always</i>?</p>
  
  <p>Lot's of people said to simply add the following to the script:</p>
  
  <pre><code>import logging
  logging.basicConfig()
  </code></pre>
  
  <p>Which, as you can see, I did but the issue still persists.</p>