New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not working #390
Comments
It also happens on me. All of the jobs configured in format of cron expression does not work. |
Me too... |
The example was wrong. You should take 5 fields for |
I read the code again, and found that the var standardParser = NewParser(
Minute | Hour | Dom | Month | Dow | Descriptor,
) ... func New(opts ...Option) *Cron {
c := &Cron{
entries: nil,
chain: NewChain(),
add: make(chan *Entry),
stop: make(chan struct{}),
snapshot: make(chan chan []Entry),
remove: make(chan EntryID),
running: false,
runningMu: sync.Mutex{},
logger: DefaultLogger,
location: time.Local,
parser: standardParser,
}
for _, opt := range opts {
opt(c)
}
return c
} To support "Second" field, create the cron object like this: cron.New(cron.WithSeconds()) BTW,the doc on |
c.AddFunc("* * * * * *", func() { fmt.Println("working") }) |
Has this issue been solve? having issues just running |
I was not able to get this line to work successfully, the only way I've found to get this to work is to use the above suggestion Hopefully this helps anyone landing on the page. I'm on v3.0.1. |
这是来自QQ邮箱的假期自动回复邮件。
我已收到您的邮件,尽快给您回复,谢谢!
|
// "github.com/robfig/cron/v3"
use the latest version v3.0.1 and 3.0.0 is also not working, my useage was wrong?
The text was updated successfully, but these errors were encountered: