cron

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cron parses standard 5-field cron expressions ("minute hour day-of-month month day-of-week") and computes fire times in UTC.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalid = errors.New("invalid cron expression")

ErrInvalid is wrapped by every Parse error.

Functions

This section is empty.

Types

type Schedule

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

Schedule is a parsed cron expression.

func Parse

func Parse(expr string) (*Schedule, error)

Parse parses a 5-field cron expression or one of the @descriptors.

func (*Schedule) Next

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

Next returns the first fire time strictly after t (in UTC), or the zero time if none exists within five years.

Jump to

Keyboard shortcuts

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