I have a small script which I want to run after every 15 minutes. I can achieve it in two ways:
By putting whole code in while loop while True:
and at end time.sleep(900)
.
By Scheduling a job to run the script after every 15 minutes once.
Both will work fine, but I am not sure whether the script keeps the resource busy while sleeping.
Please suggest.... Which one is better approach?
I think the scheduling system like cron
on Linux (don't know about Windows, but I woud expect a similar situation there) is the way to go because of its numerous advantages:
The disadvantages: