mirror of
https://github.com/aptible/supercronic.git
synced 2025-10-05 08:16:56 +08:00
32 lines
395 B
Go
32 lines
395 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
|
|
Timezone *time.Location
|
|
}
|
|
|
|
type Crontab struct {
|
|
Jobs []*Job
|
|
Context *Context
|
|
}
|