title: How can I make a function run in the background without blocking my entire program?
body: <p>I have some difficulties into making this function running in the background without blocking my entire program, how can I run that function in loop, without blocking my entire program?
  This is the function:
      while True:
         schedule.run_pending()</p>
  
  <p>Thank you for any reply.</p>
  
  <p><strong>Edit:</strong> </p>
  
  <pre><code>def FunctioninLoop():
      while True:
          schedule.run_pending()
  
  async def MyFunction():
      ScheduleToexecute=schedule.every().minute.do(Functionscheduled)
      t = Thread(target=FunctioninLoop())
      t.start()
      print("The execution is going on")
  </code></pre>