title: Unable to publish messages to GCP Pub/Sub using Python SDK when executed via Cron inside a GKE POD
body: <p>Using a PYthon SDK to publish messages to GCP Pub/SUb. THe code is running inside a Kubernetes POD on GKE.</p>
  
  <pre><code>import pymysql
  import os
  import argparse
  import time
  from google.cloud import pubsub_v1
  
  entries = ['jelly']
  
  def publish_messages(project, topic_name):
  
    publisher = pubsub_v1.PublisherClient()
    topic_path = publisher.topic_path(project, topic_name)
  
    for n in entries:
      data = u'Message number {}'.format(n)
      data = data.encode('utf-8')
      publisher.publish(topic_path, data=data)
      print "Message %s sent to queue" % n
  </code></pre>
  
  <p>Script works fine when executed manually. However, it fails when triggered via Crontab.</p>
  
  <pre class="lang-none prettyprint-override"><code>Error: No handlers could be found for logger google.cloud.pubsub_v1.publisher._batch.thread"
  </code></pre>