package
0.0.0-20241010145802-783c4038e4d0
Repository: https://github.com/starton-io/go-dispatch.git
Documentation: pkg.go.dev

# README

cron

fork from robfig/cron

# Functions

DelayIfStillRunning serializes jobs, delaying subsequent runs until the previous one is complete.
Every returns a crontab Schedule that activates once every duration.
New returns a new Cron job runner, modified by the given options.
NewChain returns a Chain consisting of the given JobWrappers.
NewParser creates a Parser with custom options.
ParseStandard returns a new crontab schedule representing the given standardSpec (https://en.wikipedia.org/wiki/Cron).
Recover panics in wrapped jobs and log them with the provided logger.
SkipIfStillRunning skips an invocation of the Job if a previous invocation is still running.
WithChain specifies Job wrappers to apply to all jobs added to this cron.
WithLocation overrides the timezone of the cron instance.
WithLogger uses the provided logger.
WithParser overrides the parser used for interpreting job schedules.
WithSeconds overrides the parser used for interpreting job schedules to include a seconds field as the first one.

# Constants

Allow descriptors such as @monthly, @weekly, etc.
Day of month field, default *.
Day of week field, default *.
Optional day of week field, default *.
Hours field, default 0.
Minutes field, default 0.
Month field, default *.
Seconds field, default 0.
Optional seconds field, default 0.

# Variables

No description provided by the author
No description provided by the author

# Structs

Chain is a sequence of JobWrappers that decorates submitted jobs with cross-cutting behaviors like logging or synchronization.
ConstantDelaySchedule represents a simple recurring duty cycle, e.g.
Cron keeps track of any number of entries, invoking the associated func as specified by the schedule.
Entry
Entry consists of a schedule and the func to execute on that schedule.
A custom Parser that can be configured.
SpecSchedule specifies a duty cycle (to the second granularity), based on a traditional crontab specification.

# Interfaces

Job is an interface for submitted cron jobs.
Schedule describes a job's duty cycle.
ScheduleParser is an interface for schedule spec parsers that return a Schedule.

# Type aliases

EntryID identifies an entry within a Cron instance.
FuncJob is a wrapper that turns a func() into a cron.Job.
JobWrapper decorates the given Job with some behavior.
Option represents a modification to the default behavior of a Cron.
Configuration options for creating a parser.