reugn / go-quartz

Minimalist and zero-dependency scheduling library for Go
https://pkg.go.dev/github.com/reugn/go-quartz/quartz
MIT License
1.8k stars 85 forks source link

ability to Start after all jobs were added #50

Closed chaporgin closed 10 months ago

chaporgin commented 1 year ago

First of all, thanks for the library.

I see that it is required to call Start before ScheduleJob. I had a few experiments trying to schedule before calling start and they were unsuccessful. And this leads me to a question: what is required to be changed to allow scheduling before the start? The reason for that would be that I want all components to be composed, then started to produce some work at a predictable point in time. So I have this central structure that is responsible for the Start moment.

reugn commented 1 year ago

@antonyc, sorry for late response. I've started looking into this issue, and it would help if you explain your exact use case, since scheduling using a cron expression will have the same effect regardless whether the scheduler is started or not in advance.