MCPcopy
hub / github.com/robfig/cron / ParseStandard

Function ParseStandard

parser.go:229–231  ·  parser.go::ParseStandard

ParseStandard returns a new crontab schedule representing the given standardSpec (https://en.wikipedia.org/wiki/Cron). It requires 5 entries representing: minute, hour, day of month, month and day of week, in that order. It returns a descriptive error if the spec is not valid. It accepts - Standard

(standardSpec string)

Source from the content-addressed store, hash-verified

227// - Standard crontab specs, e.g. "* * * * ?"
228// - Descriptors, e.g. "@midnight", "@every 1h30m"
229func ParseStandard(standardSpec string) (Schedule, error) {
230 return standardParser.Parse(standardSpec)
231}
232
233// getField returns an Int with the bits set representing all of the times that
234// the field represents or error parsing field value. A "field" is a comma-separated

Callers 5

TestActivationFunction · 0.85
TestErrorsFunction · 0.85
TestNextWithTzFunction · 0.85
TestSlash0NoHangFunction · 0.85
TestStandardSpecScheduleFunction · 0.85

Calls 1

ParseMethod · 0.65

Tested by 5

TestActivationFunction · 0.68
TestErrorsFunction · 0.68
TestNextWithTzFunction · 0.68
TestSlash0NoHangFunction · 0.68
TestStandardSpecScheduleFunction · 0.68