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

refactor(schedule): use croner library to check schedule #32573

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

RahulGautamSingh
Copy link
Collaborator

@RahulGautamSingh RahulGautamSingh commented Nov 16, 2024

Changes

Use the nextRun() method from croner library to get the next scheduled date. And compare it to current date to check if current date lies in the cron schedule.

Context

Cover implementation requirements of: #32414

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@RahulGautamSingh RahulGautamSingh marked this pull request as ready for review November 18, 2024 15:37
@RahulGautamSingh RahulGautamSingh changed the title refactor(schedule): use cron-parser library to check schedule refactor(schedule): use croner library to check schedule Nov 18, 2024
@RahulGautamSingh RahulGautamSingh requested review from rarkins, secustor and viceice and removed request for rarkins and secustor November 18, 2024 16:43
Copy link
Collaborator

@secustor secustor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The massaging of the input value is missing, else LGTM

@RahulGautamSingh
Copy link
Collaborator Author

The massaging of the input value is missing, else LGTM

It was disicussed internally to leave it as we will need to add more complexity to support something that is essentially an invalid configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants