Skip to content

Graphorin API reference v0.12.1


Graphorin API reference / @graphorin/triggers / cron / nextFireAfter

Function: nextFireAfter()

ts
function nextFireAfter(
   parsed, 
   from, 
   timeZone?): Date | null;

Defined in: packages/triggers/src/cron.ts:193

Compute the next fire time strictly after from for the supplied cron schedule. Returns a UTC Date.

Without timeZone the expression is evaluated in UTC (the historical default). With an IANA timeZone the fields match the wall clock of that zone; DST transitions follow Vixie cron semantics (see the module doc, W-124).

Returns null if no fire happens in the next 4 years (defensive - impossible for a well-formed cron expression except a vacuous combination that never aligns).

Parameters

ParameterType
parsedParsedCron
fromDate
timeZone?string

Returns

Date | null

Stable