MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / _parseCronFields

Function _parseCronFields

packages/server/src/services/schedule/utils.ts:227–237  ·  view source on GitHub ↗

Parse a cron expression once so fields can be reused across many date checks.

(expression: string)

Source from the content-addressed store, hash-verified

225
226/** Parse a cron expression once so fields can be reused across many date checks. */
227function _parseCronFields(expression: string): _ParsedCronFields {
228 const fields = expression.trim().split(/\s+/)
229 const offset = fields.length === 6 ? 1 : 0
230 return {
231 minuteField: fields[0 + offset],
232 hourField: fields[1 + offset],
233 domField: fields[2 + offset],
234 monthField: fields[3 + offset],
235 dowField: fields[4 + offset]
236 }
237}
238
239/**
240 * Check whether a pre-parsed cron matches `date`, using a pre-built Intl.DateTimeFormat for TZ conversion.

Callers 2

computeNextRunAtFunction · 0.85
cronDomMatchesNowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected