Skip to content

Guard against invalid schedule loading - #543

Open
taf2 wants to merge 1 commit into
resque:masterfrom
taf2:master
Open

taf2 wants to merge 1 commit into
resque:masterfrom
taf2:master

Conversation

@taf2

@taf2 taf2 commented May 12, 2016

Copy link
Copy Markdown

If a bad crontab is published to a schedule this will blow up and cause the process to become corrupted. This causes lots of schedules to be missed.

@meatballhat

Copy link
Copy Markdown
Member

@taf2 Hello! Can you rebase against master, and please edit your commit message to remove the profanity? Thank you! 😸

@meatballhat meatballhat self-assigned this May 25, 2016
@meatballhat meatballhat changed the title Safety Check Guard against invalid schedule loading Jun 26, 2016
@iloveitaly

Copy link
Copy Markdown
Contributor

@taf2 friendly reminder on this PR!

@PatrickTulskie

Copy link
Copy Markdown
Member

@taf2 hey just a heads up, I'm making moves to get through a bunch of the PR backlog for resque scheduler. This looks like a good candidate for 5.0.1. If you have a chance, can you rebase and push this up again and I'll get it live? If you're not or I don't hear back from you in the next week or so, I'll have my agent rebase and open a fresh PR with your change so you still get credit for the contribution.

This PR has a bunch of extra stuff in it too, so the only part that we would want to keep is the the check that stops a bad cron string from crashing the scheduler. If it's easier, maybe pull that fix into another PR and close this one.

@PatrickTulskie PatrickTulskie added this to the v5.0.1 milestone Sep 24, 2026
@taf2

taf2 commented Sep 24, 2026

Copy link
Copy Markdown
Author

Let me see - away from keyboard but might be able to shortly

@taf2

taf2 commented Sep 24, 2026

Copy link
Copy Markdown
Author

Rebased onto current master and pushed as 23c5058. The PR now contains only the invalid-schedule guard, regression tests, and the corresponding RuboCop module-length adjustment; the unrelated changes and old commit messages have been removed.

Invalid cron strings are logged and skipped so the remaining schedules can still load. The regression tests cover both a malformed cron with options and loading a valid schedule after a malformed entry.

Validation: all 297 tests pass (627 assertions), and RuboCop passes. The new regression tests also fail against unmodified master, confirming they reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants