caelum / vraptor-quartzjob

A simple quartz job
3 stars 11 forks source link

Basic documentation #8

Closed csokol closed 10 years ago

csokol commented 10 years ago

The docs should describe how to schedule jobs and how to configure the environment properties required.

nykolaslima commented 10 years ago

Have any news about this docs @csokol?

csokol commented 10 years ago

Sorry, @nykolaslima, I'll start working on that right now!

nykolaslima commented 10 years ago

Thank you @csokol.

I need to implement an dynamic scheduling. I'll try to do this here and if it works I'll open a pull request.

Thank you again.

csokol commented 10 years ago

Ok, maybe you could create an api the dinamically schedule requests to vraptor (this plugin actually execute scheduled tasks by sending requests to the application)

Chico Sokol

On Tue, Sep 16, 2014 at 5:38 PM, Nykolas Laurentino de Lima < notifications@github.com> wrote:

Thank you @csokol https://github.com/csokol.

I need to implement an dynamic scheduling. I'll try to do this here and if it works I'll open a pull request.

Thank you again.

— Reply to this email directly or view it on GitHub https://github.com/caelum/vraptor-quartzjob/issues/8#issuecomment-55809653 .

nykolaslima commented 10 years ago

Actually I want to keep sending requests to the application. But I want to schedule the task to send the request programatically.

2014-09-16 17:41 GMT-03:00 csokol notifications@github.com:

Ok, maybe you could create an api the dinamically schedule requests to vraptor (this plugin actually execute scheduled tasks by sending requests to the application)

Chico Sokol

On Tue, Sep 16, 2014 at 5:38 PM, Nykolas Laurentino de Lima < notifications@github.com> wrote:

Thank you @csokol https://github.com/csokol.

I need to implement an dynamic scheduling. I'll try to do this here and if it works I'll open a pull request.

Thank you again.

— Reply to this email directly or view it on GitHub < https://github.com/caelum/vraptor-quartzjob/issues/8#issuecomment-55809653>

.

— Reply to this email directly or view it on GitHub https://github.com/caelum/vraptor-quartzjob/issues/8#issuecomment-55810160 .

csokol commented 10 years ago

So what you will need to do basically is create a wrapper api of quartz to schedule requests. Maybe you could do it in a type safe style, like:

@Controller
class MyJob {
    public void execute(int x) {
        syso("executing with " + x);
    }
}
@Controller
class MyController {
    @Inject
    private VRaptorScheduler scheduler;
    public void schedule(int param) {
        scheduler.schedule(date).job(MyJob.class).execute(param);
    }
}

I think it's cool api, what do you think?

nykolaslima commented 10 years ago

I liked your suggestion. I did something similar into my application.

I'll create a pullrequest with this feature for you!

[]s

nykolaslima commented 10 years ago

@csokol my application is not calling /jobs/configure after VRaptor got initialised.

Can you give me some help with this? (if you can add me to gtalk nykolas.lima@gmail.com :))

fredericocostachaves commented 7 years ago

Same problem here... @csokol