RFC: Constant interval scheduling "on XXX"
- Dominant language
- Python
- Stars
- 12.3k
- Forks
- 999
- PR merge metrics
- No merged PRs in 30d
Description
**Request for Comments**
I have a task that I want run on :00, :05, ..., :55 seconds.
I couldn't find a example of this so I wrote a snippet that works:
```
for i in range(0,60,5):
schedule.every().minute.at(":%02d" % i).do(job)
```
If this functionality exists, please do let me know.
**Disadvantages**
- I have 12 tasks when it's really one task run, so a flood of tags will be messy
- Its readability fails miserably compared to the beautiful semantics in the current API
Now, it would be nice if we could do something like:
`schedule.on_the.hour().do(job)`
but I'm not sure how we would generalize it for all cases.
For my example above,
`schedule.on_the.every(5).minute.do(job)`
sounds a bit awkward.
Any suggestions/comments?
Contributor guide
No contributing guide indexed for this repository
Research direction
This RFC does not name files, tests, or an entry point. Start by reviewing the existing scheduling API around schedule.every() and the documented interval behavior. Done would require an agreed, generalized "on" or constant-interval API, with its semantics and tests established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100