I would like to run a Python script in another Python script. I understand that the best way to do that is importing that script. But I couldn't figure out how I can run that script every 60 seconds. What I have tried so far:
import time
import mailyolla
while(1):
mailyolla
time.sleep(60)
and
import time
while(1):
import mailyolla
time.sleep(60)
Neither worked. What should I do?
1 Answer 1
You should define a main() function in your mailyolla file that is executing the task you want. Then, the above script would look like:
import time
import mailyolla
while(True):
mailyolla.main()
time.sleep(60)
Sign up to request clarification or add additional context in comments.
Comments
lang-py