parserext

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package parserext provides optional cron parser extensions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuartzParser

func NewQuartzParser(loc *time.Location) cron.Parser

NewQuartzParser handles standard specs plus the Quartz tokens L, L-n, LW, nW, N#M, and NL. Numeric day-of-week stays cron-style 0-6 Sunday-first (not Quartz's 1-7); name forms (FRI#3, FRIL) are unambiguous. Specs without Quartz-only tokens are forwarded to the standard parser.

Types

type QuartzSchedule

type QuartzSchedule struct {
	// contains filtered or unexported fields
}

QuartzSchedule supports the Quartz subset parsed by NewQuartzParser.

func (*QuartzSchedule) Location

func (s *QuartzSchedule) Location() *time.Location

Location returns the schedule's evaluation time zone.

func (*QuartzSchedule) Next

func (s *QuartzSchedule) Next(t time.Time) time.Time

Next returns the next firing after t, or zero if none is found. It shares SpecSchedule.Next's structure: bitmask jumps with wall-clock reconstruction for the hour so DST spring-forward days are handled correctly.

func (*QuartzSchedule) Upcoming

func (s *QuartzSchedule) Upcoming(from time.Time) iter.Seq[time.Time]

Upcoming is a lazy iterator over future firings.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL