I like this library, it is simple and easy to use. However, the program process maybe continues to use the system resources like cpu resources.
For example, if I add a print statement after schedule.run_pending() like this. The schedule awake will be printed every second.
while True:
schedule.run_pending()
print("schedule awake")
time.sleep(1)
So is there any ways to make the code to eliminate while True loop or make schedule.run_pending() block to wait for the next job. And during the idle time, no or few system resources are needed.
Maybe you can try putting sleep(x) at the end of each process that needs to be completed if you know how long in-between intervals so that it wakes up before the next one needs to be run.
I like this library, it is simple and easy to use. However, the program process maybe continues to use the system resources like cpu resources.
For example, if I add a print statement after
schedule.run_pending()
like this. Theschedule awake
will be printed every second.So is there any ways to make the code to eliminate
while True
loop or makeschedule.run_pending()
block to wait for the next job. And during the idle time, no or few system resources are needed.