Skip to content
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

【Question】cron Not support DayOfWeek 'L' #464

Open
whillt opened this issue Aug 26, 2022 · 2 comments
Open

【Question】cron Not support DayOfWeek 'L' #464

whillt opened this issue Aug 26, 2022 · 2 comments

Comments

@whillt
Copy link

whillt commented Aug 26, 2022

in old version: github.com/robfig/cron v1.2.0

use expression:
p, err := cron.Parse("0 20 14 ? * 5L")
occur error: strconv.Atoi: parsing "5L": invalid syntax

so upgrade new version:github.com/robfig/cron/v3 v3.0.0
use expression:
subsParser := cron.NewParser(cron.Second | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow) sched, err := subsParser.Parse("0 20 14 ? * 5L")

still have errors :failed to parse int from 5L: strconv.Atoi: parsing "5L": invalid syntax

Looking forward to your reply thank you

@whillt whillt changed the title cron Not support DayOfWeek 'L' 【Question】cron Not support DayOfWeek 'L' Aug 26, 2022
@whillt
Copy link
Author

whillt commented Aug 26, 2022

I read the source code and found that L is not a standard cron character. Is there any alternative?

@rissw
Copy link

rissw commented Oct 25, 2022

you can try using #325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants