Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cron Validation (#4842) #4898

Merged
merged 2 commits into from
May 2, 2023
Merged

Conversation

aj3x
Copy link
Contributor

@aj3x aj3x commented Apr 8, 2023

The cron job can't be created if the year is more than 100 years in the future.
Getting the next valid time will return null if this is the case.

  • add next-date cron validation to API
    • Prevents Ombi from crashing on startup by changing to default CRON expression
  • add next-date cron validation to the job settings page
    • Prevents the user from inputting a CRON job that won't trigger within 100 years
Screen.Recording.2023-04-14.at.14.15.43.mov

Closes #4842

The cron job can't be created if the year is more than 100 years in the future.
Getting the next valid time will return null if this is the case.

* add next cron validation to api
* add next cron validation to job settings page
@aj3x
Copy link
Contributor Author

aj3x commented Apr 8, 2023

If need be, a separate message could be added to the Job page to indicate that the CRON date is too far in the future

@aj3x aj3x force-pushed the 4842-fix-cron-validation branch from 073deab to cf75947 Compare April 8, 2023 17:33
@aj3x aj3x changed the title Add Cron Next Time Validation (#4842) Fix Cron Validation (#4842) Apr 13, 2023
@tidusjar
Copy link
Member

Thanks!

@tidusjar tidusjar merged commit 97cc42f into Ombi-app:develop May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants