Does Quartz compile work scripts after execution?

I want to use Quartz to work as a script scheduler, you write VB from the GUI and then select a trigger, the code is then compiled and run on the trigger, the hard bit is how I process it so that it runs this script in the application context so that it could get access to entity framework models, etc. How could I achieve this?

+6
source share
1 answer

Basically you need to put Quartz.Server on top of your application. Add this project to your solution.

If you just need to use your entities in quartz jobs, add a project with entities as a reference to Quartz.Server and use objects as in the main application.

If you are using some kind of IoC container, you can use extensions like this to inject dependencies to the job. Or you can write your own SchedulerFactory and JobFactory and create your work environment here.

+4
source

All Articles