dbader / dbader/schedule

Is there any ways to run without while True?

Open
#551 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
12.3k
Forks
999
PR merge metrics
No merged PRs in 30d

Description

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.

```py
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.