























@@ -211,6 +211,17 @@ describe("normalizeCronJobCreate", () => {
211211expectNormalizedAtSchedule({ kind: "at", atMs: "2026-01-12T18:00:00" });
212212});
213213214+it("keeps out-of-range numeric schedule.atMs invalid instead of throwing for create jobs", () => {
215+const normalized = normalizeMainSystemEventCreateJob({
216+name: "out-of-range-at-ms",
217+schedule: { kind: "at", atMs: 8_640_000_000_000_001 },
218+});
219+220+const schedule = normalized.schedule as Record<string, unknown>;
221+expect(schedule).toEqual({ kind: "at" });
222+expect(validateCronAddParams(normalized)).toBe(false);
223+});
224+214225it("migrates legacy schedule.cron into schedule.expr", () => {
215226const normalized = normalizeMainSystemEventCreateJob({
216227name: "legacy-cron-field",
@@ -1065,6 +1076,16 @@ describe("normalizeCronJobPatch", () => {
10651076expect(validateCronUpdateParams({ id: "job-1", patch: normalized })).toBe(true);
10661077});
106710781079+it("keeps out-of-range numeric schedule.atMs invalid instead of throwing for patches", () => {
1080+const normalized = normalizeCronJobPatch({
1081+schedule: { kind: "at", atMs: 8_640_000_000_000_001 },
1082+}) as unknown as Record<string, unknown>;
1083+1084+const schedule = normalized.schedule as Record<string, unknown>;
1085+expect(schedule).toEqual({ kind: "at" });
1086+expect(validateCronUpdateParams({ id: "job-1", patch: normalized })).toBe(false);
1087+});
1088+10681089it("prunes staggerMs from every schedules for patches", () => {
10691090const normalized = normalizeCronJobPatch({
10701091schedule: {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。