MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / hasFireWithinYears

Function hasFireWithinYears

packages/agent-core/src/tools/cron/cron-expr.ts:218–225  ·  view source on GitHub ↗
(
  expr: ParsedCronExpression,
  years: number,
  fromMs: number,
)

Source from the content-addressed store, hash-verified

216 * will later refuse to compute).
217 */
218export function hasFireWithinYears(
219 expr: ParsedCronExpression,
220 years: number,
221 fromMs: number,
222): boolean {
223 const cap = Math.max(1, Math.floor(years * 366 * 24 * 60));
224 return nextRunWithinMinutes(expr, fromMs, cap) !== null;
225}
226
227function nextRunWithinMinutes(
228 expr: ParsedCronExpression,

Callers 2

cron-expr.test.tsFile · 0.90
resolveExecutionMethod · 0.90

Calls 1

nextRunWithinMinutesFunction · 0.85

Tested by

no test coverage detected