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

Bug: */5 * * * * vs 5 minutes #6

Closed
francistogram opened this issue Feb 4, 2024 · 3 comments
Closed

Bug: */5 * * * * vs 5 minutes #6

francistogram opened this issue Feb 4, 2024 · 3 comments
Labels
bug Something isn't working planned 🎉

Comments

@francistogram
Copy link

These two unexpectedly do different things

*/5 * * * *

Will post every 5 minutes at the 0 and 5 minute intervals
image

5 minutes

Will post every 5 minutes but unclear the starting point. I assume it's when the schedule was created but unclear until it's been scheduled
image

I'd personally prefer to use the human readable format but because of this limitation I end up writing everything using the cron syntax

@danmindru
Copy link
Member

It would have a slightly different effect, the human readable syntax is 5 minutes from the point of submission, so say you submit the schedule at 21:23:05, the next will be at 21:28:05 and so on.

But it'll be excellent to convey this through the description indeed.

@francistogram
Copy link
Author

Yeah I mean I'd expect them to be the same given that taking */5 * * * * to human readable is "Every 5 minutes" but then going the other way and inputting every 5 minutes gives every 5 minutes but at a different interval

Also I think as a developer that for having things to be more predictable e.g. on a :00 or :05 is so much more preferable to every 5 minutes at the current starting point

@danmindru
Copy link
Member

I see, that makes sense. It would require a start date then, because cron kind of has both start date and schedule at the same time :)
Added a new issue, but this might require a bit of a rework to get right (#8)

For now made the description more clear at least and made it a bit nicer to work with (see #7).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working planned 🎉
Projects
None yet
Development

No branches or pull requests

2 participants