GraphReFlyTS

API Reference

parseCron()

Parse a standard five-field cron expression.

Import

import { parseCron } from "@graphrefly/ts/sources";

Signature

function parseCron(expr: string): CronSchedule

Parameters

ParameterTypeDescription
exprstringCron expression in minute hour day month weekday order.

Returns

A normalized cron schedule with one set per field.

Example

parseCron("0,5 * * * *");

Source

packages/ts/src/graph/sources.ts