javan / javan/whenever

Only update crontab if contents will change

Open
#857 0 comments 0 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

We have alert monitoring set up that warns us any time a crontab entry changes. Every time we deploy (several times per week) we update a whole fleet of servers. This rewrites the crontab, which then sends the alerts. The crontab is updated even if no logical changes happen so the large majority of the time the alert is meaningless. That said, it would be nice to keep that alert on and have it be meaningful.

So, I'm wondering if whenever could look at the existing crontab and know if anything would change. If so, it would write but otherwise it would not touch the file. It would also make the Whenever generated tasks for comment more meaningful as it would be the last time it was changed not just the last time it was generated.

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

The issue does not name a file, test, or entry point. Start by tracing how Whenever reads or writes the existing crontab and generates the Whenever generated tasks for comment; done means unchanged logical contents leave the crontab untouched, while changed contents are written and the comment reflects the change.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.