I want to use Quartz to act as a script scheduler, you write the VB from a GUI and then select a trigger, the code is then compiled and executed on the trigger, the difficult bit is how do I handle it so that it runs this script with in the application context so it can access my entity framework models, etc. How would I achieve this?
Basically what you need is 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 then add your project with entities as reference to Quartz.Server and use entities as you do in your main app.
If you use some IoC-container then you can use extensions like this to inject dependecies to the job. Or you can write your own SchedulerFactory and JobFactory and build your job environment here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With