i need to repeat the function every x seconds, how can i do this ? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

i need to repeat the function every x seconds, how can i do this ?

Python Function Repeat

18th Jan 2021, 7:53 PM
Adamyan
Adamyan - avatar
2 Réponses
+ 4
Seg Adamyan , there are modules available (not in standard python installation) that can do this. what you need is a scheduler module, that can execute tasks in defined time schemes. here is a link to the documentation: https://docs.python.org/3/library/sched.html there is also an other module: https://datasciencebeginners.com/2018/10/28/how-to-schedule-automate-python-tasks/
18th Jan 2021, 8:14 PM
Lothar
Lothar - avatar
+ 4
There are Threading module that have specific functions for time and can be used to have a function as argument with timer interval .Search for Thread and Threading .
18th Jan 2021, 8:30 PM
HBhZ_C
HBhZ_C - avatar