Hi guys I 'm a quantitative crypto investor.. or better I wuould be ;)
I need a way to run my fucntion to get data each minutes: I use the task: always-on tasks. MY FUNCTION:
import sched import time from datetime import datetime
def task(name):
dt = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
print("Execute Task:", name, dt)
while True :
scheduler = sched.scheduler(time.time, time.sleep)
scheduler.enterabs(time.time()+60, 1, task, ("Open Browser",))
# Run all scheduled events
scheduler.run()
The problem is that each 20 / 30 minutes the time increase of one second so for sure I will lost one data. What can I do ?
I need somthing that start exactly at the .00 of each minutes exist ? Thanks a lot for your help !