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

A bug with "evety six month" (*/6) #69

Open
Deliaz opened this issue Sep 13, 2024 · 3 comments
Open

A bug with "evety six month" (*/6) #69

Deliaz opened this issue Sep 13, 2024 · 3 comments
Labels
bug Something isn't working PR welcome You can open a PR for this issue

Comments

@Deliaz
Copy link

Deliaz commented Sep 13, 2024

Hi,

I am playing aroung with the component on the Storybook page and noticed that the following expression
0 5 1 */6 * (Every 6 months, first day of the month, at 5AM), when I input it, is being translated to 0 0 * 1,7 * which wouldn't be interpret correctly.

Does the component support */6 rule?

@xrutayisire
Copy link
Owner

Hi,

Oh nice catch. But I guess it's more a visual bug no? 1,7 means the same as */6 right?

@xrutayisire xrutayisire added bug Something isn't working PR welcome You can open a PR for this issue labels Sep 13, 2024
@Deliaz
Copy link
Author

Deliaz commented Sep 15, 2024

Hey @xrutayisire, thanks for the quick reply.

Unfortunately, it wouldn't be the same. While */6 could overlap with 1,7 if configured at the beginning of the year, */6 actually means "every 6 months." This means that if the cron job starts in a different month, the selected months would shift accordingly, making them different from 1,7, which is fixed to January and July.

Update: ChatGPT failed me ^

Yes, it seems like a presentational bug. If you can give me the right direction, I can try to look at this.

@xrutayisire
Copy link
Owner

Hi,

Thank you! Code is a bit old, could be wrong, but I would start by adding a unit test for that and write console.log. I see already a test that cover */2 here.

I would check first partToString function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR welcome You can open a PR for this issue
Projects
None yet
Development

No branches or pull requests

2 participants