How do I make Quartz.NET run jobs from separate assembly?

假装没事ソ 提交于 2019-12-13 01:30:52

问题


I am new to Quartz.NET so bear with me please. I would like to run Quartz.NET as a stand-alone service which runs jobs. I would like to create a different assembly containing all the jobs I need to run and have Quartz configured to run these jobs from my assembly.

Thus, whenever I create a new job, I add this to my assembly and all I am left to do is to replace the old assembly and restart the Quartz service.

Is this possible?

Could anyone please show/redirect me to a code example showing how to do this.


回答1:


in order to seek a good solution for your question, first of all as Quartz.examples has in the example12 and 13, you can create via Remoting.net a stand-alone server, and it's very simple the way to do that just make yourself a copy-paste ;-). Besides you have to add a reference of your assembly of jobs into the server's assembly in order to stablish a communication of whom Wich "Execute() method" have to exe and for be avoid of exceptions... then you could create a Clientremoting where you just have to select the job that you would schedule and run it using the same port, channel and binding than the server. Let me know if you wanna some example codes of it.



来源:https://stackoverflow.com/questions/4753965/how-do-i-make-quartz-net-run-jobs-from-separate-assembly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!