go-co-op / gocron

Easy and fluent Go cron scheduling. This is a fork from https://github.com/jasonlvhit/gocron
MIT License
5.61k stars 308 forks source link

issue-654: allow setting a stopTime for job. #760

Closed Higan closed 3 months ago

Higan commented 3 months ago

What does this do?

This PR exposes a stopTime when creating a job so that the job cannot be executed once the stopTime is reached.

Which issue(s) does this PR fix/relate to?

Resolves #654

List any changes that modify/break current functionality

Have you included tests for your changes?

Yes I created several test cases in scheduler_test.go regarding job creation with stopTime specified and also the expected behavior when stopTime is reached.

Did you document any new/modified functionality?

Notes

Higan commented 3 months ago

@JohnRoesler Sure I'll handle these later today. Thanks for reviewing and commenting.

Higan commented 3 months ago

Hi @JohnRoesler I've made some changes with regard to your comments and now you could check this PR again. Thank you.