0

time.sleep(60) is oblivious to the time.

So how to get python to execute a function at say the 50-second mark of every minute?

EDIT: I mean I want my function to be executed at:

-20:00:50
-20:01:50
-20:02:50
and so on...
alexx0186
  • 1,557
  • 5
  • 20
  • 32
  • 2
    Does this answer your question? [Repeat python function at every system clock minute](/q/70799693/4518341) – wjandrea Jul 06 '22 at 21:50
  • 1
    Ah perfect, thanks for that! I've been trying to word it correctly but still couldn't find it – alexx0186 Jul 06 '22 at 21:52

1 Answers1

0

Just put it in a loop:

while True:
    my_function()
    time.sleep(50)