I'm new to python and I'm developing a raspberry pi program that will check a sever ever 2 min. i have the server check part working But, I'm not sure how to accomplish the repeat. For example in arduino there is void loop()
function there I could wait to see if 2min have pass then call the sever check function without a problem. How would I accomplish this in python?
Asked
Active
Viewed 6,624 times
-1

Jean Pierre
- 201
- 5
- 17
-
`while True:` will go in an endless loop – Mathias711 Oct 11 '16 at 06:13
-
I need to also do other functions as well that would block the flow. would it not? – Jean Pierre Oct 11 '16 at 06:15
-
Why not just use crontab if you are working with raspberry pi and have Linux? – Philip Tzou Oct 11 '16 at 06:16
-
What I'm making is a digital signage program and it will display images and video fullscreen so this is just a small part of it. – Jean Pierre Oct 11 '16 at 06:25
1 Answers
0
Check out this link:
https://thepihut.com/blogs/raspberry-pi-tutorials/34930820-running-things-regularly-cron
You can setup a script to run every 2 minutes

Anu
- 400
- 1
- 4
- 19