Sundial icon indicating copy to clipboard operation
Sundial copied to clipboard

Create an object and then give it to Sundial to run.

Open markthegrea opened this issue 8 years ago • 3 comments

We would like to be able to create an object and then give it to Sundial to run. Currently we can only give it the class name and such but we are using Guice and need to use the Guice object. It would be great to have

MyObject mo = new MyObject("yes");//I can set the object up here... SundialJobScheduler.addJob(name, mo, m, false);

And of course MyObject would extend Job...

markthegrea avatar Mar 02 '16 20:03 markthegrea

What about using a custom JobFactory that could inject objects into the job or returning a job instance as described in quartz tutorial? (See: Job “Instances”) This is not possible in Sundial right now but with https://github.com/timmolter/Sundial/pull/24

lind avatar Apr 14 '16 13:04 lind

Note to self. Create a second JobFactory like SimpleJobFactory.

timmolter avatar Mar 10 '19 20:03 timmolter

@lind You you have a sample JobFactory that takes new'd up objects that you could share?

timmolter avatar Mar 11 '19 11:03 timmolter