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

Return the last activation time, earlierthan the given time. #303

Open
wenxinnnnn opened this issue Apr 17, 2020 · 0 comments
Open

Return the last activation time, earlierthan the given time. #303

wenxinnnnn opened this issue Apr 17, 2020 · 0 comments

Comments

@wenxinnnnn
Copy link

What would you like to be added:
I hope the author can add the Last (time. Time) time.Time method to the schedule interface,return the last activation time, earlierthan the given time.

You can even extend Last (time. Time, Num int) time. Time and Next (time. Time, Num int) time. Time methods. Num represents the last num times.

example:
schedule, _ = cron.Parse("0 0 0/1 * * ?")
now := time.Now()
schedule.Next(now)
schedule.Last(now)
schedule.Next(now,2)
schedule.Last(now,3)

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

1 participant