title: Run schedule function in new thread
body: <p>I used the <a href="https://schedule.readthedocs.io/en/stable/" rel="noreferrer">schedule</a> library to schedule a function every X seconds:</p>
  
  <p>Want I want is to run this function on separate thread. I found this in the documentation on how to <a href="https://schedule.readthedocs.io/en/stable/faq.html#how-to-continuously-run-the-scheduler-without-blocking-the-main-thread" rel="noreferrer">Run the scheduler in a separate thread</a> but I didn't understand what he did.</p>
  
  <p>Is there someone who can explain to me how to do that ? </p>
  
  <p><strong>Update</strong>:</p>
  
  <p>This what I tried:</p>
  
  <pre><code>def post_to_db_in_new_thread():
      schedule.every(15).seconds.do(save_db)
  
  t1 = threading.Thread(target=post_to_db_in_new_thread, args=[])
  
  t1.start()
  </code></pre>