-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Hi there, and thank you for the great work with this gem! I've got an idea, how we can make it even better.
It seems that at the moment crono does not provide any strict default value for at option in period setting. This fact leads to situations like this:
> period = Crono::Period.new(1.month)
=> #<Crono::Period:0x00007fbc63404170 @period=1 month>
> period.next
=> 2017-12-29 10:50:26 +0600
> period.next
=> 2017-12-29 10:50:34 +0600
So next is shifting according to the time of invocation. It can cause confusing situation, when your monthly (for example) task will never be performed, if you deploy (and hence restart) your app more frequently, than once in a month. Actually, me and my colleagues hit that :)
So my proposal is to make at option mandatory, or provide some sensible default (midnight maybe?) to avoid such confusion?
What do you think about it?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels