-
Notifications
You must be signed in to change notification settings - Fork 68
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
Support custom functions for scheduling repeated jobs #216
base: master
Are you sure you want to change the base?
Conversation
@mitar, thanks for this, but is this sufficient to handle all of the cases with repeating jobs etc? |
I have not used it yet, but I think it should. Do you see any reason why not? But yes, I have not yet tested it by trying to make schedule with timezone support. But is there any other place where later.js is used? I was thinking of simply allowing one to use your own function instead of later.js and that this should be enough. |
Yes, Later.js gets used in https://github.com/vsivsi/meteor-job-collection/blob/master/src/shared.coffee#L1059 |
I completely missed that. Now I am not even sure if #218 is a complete fix. |
It should be, right? Because that bug only affected the first run of a repeating schedule... |
Once you guys get this sorted I'd love a ducumented example of how to implement for timezones and DST scenarios on repeating jobs. Have been struggling ever since DST started. 😕 @mitar Would be happy to test. |
I pushed new commits to finalize my proposal of the API. @tyvdh, it would be great if you could try it out and implement functions to handle timezone scheduling. You have to implement two methods Moreover, I suggest that you extend |
HI, thanks for doing this! I think there should probably be one or more tests added (preferably that don't depend on momentTZ) that use these new function hooks (plus Thanks! |
I'm not integrating this into 1.5.0, releasing today, because there is still insufficient test coverage of this new functionality. I'll consider it for a future release once that is complete. |
Haven't seen this before mentioning you on the other issue @mitar (If the time when you are processing the job is on the same range of the later.schedule when you do a job.done, the next calculated value can be set incorrectly) |
Provides a way to hook into computing
after
when scheduling repeated jobs. It could be used to for example configure timezones.