Pass the current duration number into the block
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 8.9k
- Forks
- 715
- PR merge metrics
- No merged PRs in 30d
Description
Not quite sure how to word that subject. Sorry.
Basically, I'd love to do this:
every 1.minute do |minute|
if minute % 15 == 0
do_something_on_the_quarter_hour
else
do_something_else # <== do this every minute that's *not* on the quarter hour
end
end
Would be easier than a minutely-but-not-on-the-quarter-hour cron…
Not sure how it would work for other intervals, but it's an idea.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named in the issue. Start by tracing the interval block API and determine how the current duration value could be exposed to the block, including the behavior for intervals other than one minute; done means the shown quarter-hour example works and the relevant behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100