Hello. There are 2 functions. The look() function will periodically send a request to the server and wait for the desired response. The doing() function will be launched if the required response is received.
The goal is for the doing() function to work in parallel (its work can take a day) and many doing() functions can work in parallel at once without interfering with the work of the look() function
import time def doing(): print('Делаем что-то') time.sleep(60) def look(): while True: print('Ищем что-то') if # что-то найдено: doing()