-1
I want to run a code/line code once every hour while running the script in python, as I run every hour?
-1
I want to run a code/line code once every hour while running the script in python, as I run every hour?
2
I recommend you take a look at the library Schedule
import schedule
import time
def f():
print("Hello World")
schedule.every().hour.do(f)
while True:
schedule.run_pending()
time.sleep(1)
1
A north for you to use in your code to run every hour.
import time
while True:
print("passou 1 hora executa esse comando")
time.sleep(3600) #A cada hora ele executa o print
Browser other questions tagged python python-3.x
You are not signed in. Login or sign up in order to post.
What is the operating system? You would probably have to schedule the execution of a script, see this question in Soen: https://stackoverflow.com/q/2725754/8133067
– Pedro Gaspar