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

Broken sentence structure on certain cron patterns #194

Open
neighbaa opened this issue Mar 15, 2021 · 4 comments
Open

Broken sentence structure on certain cron patterns #194

neighbaa opened this issue Mar 15, 2021 · 4 comments

Comments

@neighbaa
Copy link

neighbaa commented Mar 15, 2021

Description

On some patterns, the English language sentence either omits commas or adds them in in unexpected ways.

Pattern: 0 15 5 1-2,6/1 * *
Output: At 05:151 through 2 and , starting on day 6 of the month
Expected: At 05:15, day 1 through 2 and every day starting on day 6 of the month

I've given an expected output only to show what I expected the intended meaning of the sentence to be, not to dictate how that meaning should be expressed by the package.

Just wanted to say, I otherwise love the package and I find it really useful.

@bradymholt
Copy link
Owner

bradymholt commented May 9, 2023

I would welcome a PR to fix this.

@neighbaa
Copy link
Author

Hey, sadly I don't have the time + moved on from the project I was using this in, but I hope someone picks it up!

@Jackman3005
Copy link

Jackman3005 commented Jun 2, 2023

We have also found a strange output similar to this but with double commas.

Cron Input String: 0 9 * * 0-4/2,5,6
Cron Output String: At 09:00 AM, every 2 days of the week, Sunday through Thursday, , only on Friday, and , only on Saturday

Note that this is when using {verbose: true} (Edit: string is the same for non-verbose)

@bradymholt
Copy link
Owner

@Jackman3005 I would welcome a PR to fix this.

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

3 participants