mirror of
https://github.com/aptible/supercronic.git
synced 2025-11-01 03:32:37 +08:00
31 lines
368 B
Go
31 lines
368 B
Go
package crontab
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Expression interface {
|
|
Next(fromTime time.Time) time.Time
|
|
}
|
|
|
|
type CrontabLine struct {
|
|
Expression Expression
|
|
Schedule string
|
|
Command string
|
|
}
|
|
|
|
type Job struct {
|
|
CrontabLine
|
|
Position int
|
|
}
|
|
|
|
type Context struct {
|
|
Shell string
|
|
Environ map[string]string
|
|
}
|
|
|
|
type Crontab struct {
|
|
Jobs []*Job
|
|
Context *Context
|
|
}
|