Skip to content

Only update crontab if contents will change #857

@edwardloveall

Description

@edwardloveall

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions