gresrun / jesque

An implementation of Resque in Java.
http://gresrun.github.io/jesque
Apache License 2.0
630 stars 131 forks source link

Implementing a recurring job #77

Closed argvk closed 9 years ago

argvk commented 9 years ago

hey there,

I'm currently using jesque now for creating and deleting scheduled jobs, additionally to create recurring jobs now I schedule a new job before the worker returns.

I was looking for a way to create it from within jesque and figured it could probably be achieved with a zadd (zadd job with new millis i.e) in the pop method (with the job meta & frequency stored in a redis hashmap).

I haven't seen how resque-scheduler does this, would be nice if someone could shed some light on it.

Thoughts ?

argvk commented 9 years ago

I have an implementation on my fork, I'll send in a PR soon https://github.com/gresrun/jesque/compare/master...argvk:recurring-jobs

gresrun commented 9 years ago

@argvk Thanks for working on a solution; I took a quick peek and I like the direction! If you can make sure you have passing unit & integration tests for the feature, I'll merge it when you submit it.

argvk commented 9 years ago

@gresrun I've sent in a PR (#78), the test case requires a little fix, I'll send in that soon. Thanks!