I want the bot to run a defined function everyday. I did some research and then I was able to write this:
def job():
print("task")
schedule.every().day.at("11:58").do(job)
while True:
schedule.run_pending()
time.sleep(1)
but this code is blocking all other functions so I did some more research from other stack overflow answers and then I was able to write this:
def job():
print('hi task')
def threaded(func):
job_thread = threading.Thread(target=func)
job_thread.start()
if __name__=="__main__":
schedule.every().day.at("12:06").do(threaded,job)
while True:
schedule.run_pending()
unfortunately this too , blocks my entire code. I need something that doesn't block other parts of my code. How to do that?

