Skip to content

feat(cron): get next run date/time from backend#3643

Open
fiftin wants to merge 1 commit intodevelopfrom
fix_cron_or_to_end
Open

feat(cron): get next run date/time from backend#3643
fiftin wants to merge 1 commit intodevelopfrom
fix_cron_or_to_end

Conversation

@fiftin
Copy link
Collaborator

@fiftin fiftin commented Feb 19, 2026

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5853f7d3f6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +427 to +429
limit := t.AddDate(4, 0, 0)
candidate := t
for candidate.Before(limit) {

Choose a reason for hiding this comment

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

P1 Badge Remove 4-year cutoff when searching AND cron matches

andSchedule.Next stops scanning at t.AddDate(4, 0, 0), but valid day-of-month/day-of-week intersections can be much farther away (for example, 0 0 29 2 1 only matches when Feb 29 is Monday, which is often >4 years out). In those cases this returns zero and both /schedules/next and the real scheduler path (SchedulePool.addRunner) treat the schedule as having no future run, so valid cron jobs are silently never scheduled.

Useful? React with 👍 / 👎.

data: { cron_format: this.item.cron_format },
responseType: 'json',
});
this.cronNextRunTime = new Date(resp.data.next_run_time);

Choose a reason for hiding this comment

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

P2 Badge Handle empty next_run_time before constructing Date

The API explicitly returns next_run_time: "" when no next occurrence exists, but this code always does new Date(resp.data.next_run_time), which yields Invalid Date for an empty string. Downstream formatters only guard null and call Intl.DateTimeFormat(...).formatToParts(date), which throws RangeError on invalid dates, so the schedule form can crash for cron expressions with no computed next run.

Useful? React with 👍 / 👎.

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.

1 participant