How do I run a command once every hour in python?

-1

I want to run a code / line of code once every hour when running the program in python, how do I run every hour?

    
asked by anonymous 13.10.2018 / 22:56

1 answer

2

A north 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
    
13.10.2018 / 23:25