I'm totally new to Quartz .Net and am wondering what the recommended
way of hosting it is. To briefly explain what I need to do, I need
the ability to schedule a variety of tasks from my web application.
These will range from sending emails (both instantly and on a delay),
to executing custom application commands on a timer.
I've installed the windows service and had a play with it, but given
the nature of my jobs I'd like my IoC container to be able to be used
and I'm not sure of the best way to do this in that context (possibly
I could use a custom job factory for this?).
I'm considering building a WCF service that wraps Quartz .Net and that
would be able to be accessed from my web app.
Does anyone have any advice on this, or even better, examples on how
they've done it in the past?
Thanks,
Matt
> I've installed the windows service and had a play with it, but given
> the nature of my jobs I'd like my IoC container to be able to be used
> and I'm not sure of the best way to do this in that context (possibly
> I could use a custom job factory for this?).
I would you have a look at Spring.NET and it's Quartz.NET integration.
It's not perfect but gives you quite nice container integration.
Hopefully at some point there will even better integration (true job
injection).
You can always do poor man's integration with pull model using service
locator instead of push (DI) between you jobs and IoC container of
your choice.
> I'm considering building a WCF service that wraps Quartz .Net and that
> would be able to be accessed from my web app.
There's already remoting support out of the box and that could serve
you (it's not that different from WCF). You can always create your own
exporter just like there's the remoting exporter. I've had WCF on my
todo list but haven't had the time yet to see what could be done.
> Does anyone have any advice on this, or even better, examples on how
> they've done it in the past?
I think that the most important point with web apps is to have
Quartz.NET process hosted separately, in a windows service.
Hope this helps,
-Marko
I've ended up running Quartz in its Windows Service and have written a
custom job factory which instantiates jobs from Windsor.
Thanks,
Matt