title: Python script to run a function at a specific time every day does not work when deployed on Heroku
body: <p>I am trying to create  a telegram bot using python that will run a function every day at a specific time.</p>
  <pre><code>from operator import ge
  import schedule
  import telebot
  import time
  from threading import Thread
  from time import sleep
  
  
  
  
  bot = telebot.TeleBot(&quot;bot token&quot;)
  jay = chat_id
  
  def test_message():
      bot.send_message(jay, &quot;This is test&quot;)
  
  
  def schedule_checker():
      while True:
          schedule.run_pending()
          time.sleep(1)
  
  
  
  if __name__ == &quot;__main__&quot;:
      # Create the job in schedule.
      schedule.every().day.at(&quot;03:58&quot;).do(test_message)
  
      Thread(target=schedule_checker).start() 
  </code></pre>
  <p>It works when I run it via my terminal on VScode, but when I deploy the bot on Heroku, it doesn't work. I am pretty sure I deployed it correctly. Would appreciate any advice, thank you in advance and apologise if this is a dumb question (I am just starting my coding journey).</p>