javan / javan/whenever

Adding timeout to prevent overlapping cron jobs

Open
#813 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
8.9k
Forks
715
PR merge metrics
No merged PRs in 30d

Description

What about adding timeout on every or job level to prevent overlapping cron jobs?
https://man7.org/linux/man-pages/man1/timeout.1.html

Examples:

every :day, at: '12:20am', timeout: 10.minutes do
  rake "app_server:task"
end
every :day, at: '12:20am' do
  rake "app_server:task", timeout: 10.minutes
end

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing every and job-level APIs in Whenever, then read the linked timeout(1) documentation to understand the proposed behavior. Compare the two examples and define how a timeout should prevent overlapping cron jobs; done means the supported scope and behavior are agreed and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, ruby
Domain
cli, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.