Library API
    Preparing search index...

    Function getPrevCronEpoch

    • Calculates the previous occurrence of a cron schedule before the given anchor time.

      Parameters

      • pattern: string

        The cron pattern string

      • anchorMs: number

        The anchor time in milliseconds since epoch

      • timeZone: string = 'UTC'

        The time zone to use for calculations (default: 'UTC')

      Returns number

      The previous occurrence time in milliseconds since epoch