import schedule
import time
schedule.every(15).minutes.do("Имя функции")
while True:
schedule.run_pending()
time.sleep(1)
import schedule
import time
from threading import Thread
def sch():
while True:
schedule.run_pending()
time.sleep(1)
def start():
schedule.every(5).minutes.do(staff)
schedule.every(5).minutes.do(getall)
Thread(target= sch).start()
result = cursor.execute('SELECT * FROM Users ORDER BY Profit DESC').fetchall()
for x in result:
print(x)
('US', '1', 100)
('US', '12', 98)
('IR', '9', 95)
('IR', '3', 90)
('IR', '8', 70)
('IR', '4', 56)
('IR', '15', 40)
('US', '13', 10)
('US', '5', 8)
('US', '2', 5)
Country | UserID | Profit
US 1 100
US 12 98
US 13 10 - Здесь
IR 9 95
IR 3 90
IR 8 70