cron icon indicating copy to clipboard operation
cron copied to clipboard

provide ant way to change the value of Now for testing purposes

Open aaron-sysdig opened this issue 1 year ago • 1 comments

in order to test code which uses this library it would be very helpful if this library did not directly call time.Now() but instead allowed the user to specify how this library determines when Now is

aaron-sysdig avatar Jul 06 '23 08:07 aaron-sysdig

in order to test code which uses this library it would be very helpful if this library did not directly call time.Now() but instead allowed the user to specify how this library determines when Now is

This is my optimized version that can meet your needs( https://github.com/jiangzhongqiang/cron/ ) I added a new option Clock usage: cron.New(cron.WithClock(xxx))

jiangzhongqiang avatar Dec 28 '23 08:12 jiangzhongqiang