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

Predictable human interval #8

Open
danmindru opened this issue Feb 14, 2024 · 2 comments
Open

Predictable human interval #8

danmindru opened this issue Feb 14, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@danmindru
Copy link
Member

Human intervals currently work on increments from the time of submission.
So if you create a schedule at 12:07:01 for 10 minutes:

  • next schedule run will be at 12:17:01
  • and then the next will be at 12:27:01

However, there should be a mode for this to run predictably like cron, but the only way to do that is to allow users to set the start date as opposed to "now".

If you could say the start date is 12:10:00, then we can do the next at 12:20:00 etc. however this is a bit more tricky with monthly values.

Perhaps one approach to solve this would be to convert human readable to a cron so it works more predictably, if possible.

@danmindru danmindru added the enhancement New feature or request label Feb 14, 2024
@francistogram
Copy link

Question for you: would it make sense to do the same thing that cron syntax does which is assume start date is the beginning of the day and then find the nearest interval e.g. every 5 minutes really means every 5 minutes after 12:00:00am

So if I input "5 minutes" it'd calculate all of these 5 minute intervals and then when saved the start time would be set to the soonest interval?

@danmindru
Copy link
Member Author

That'll be a reasonable implementation!
However, it might be a bit confusing if your interval is "1 day and 12 hours".

If the current date/time is 01.01.24 13:00, you'd
expect the next run to be at 03.01.24 01:00
However if we take 12AM as the start,
the actual next run will be at 02.01.24 12:00

Perhaps that's not an issue if it's clearly stated, but I am beginning to think the ability to specify a start date is a requirement here.

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

No branches or pull requests

2 participants