想实现类似插件一样的job,然后支持新增和删除。反射加载dll的话无法释放的,本地dll也无法删除。
删除任务时,顺便把任务所在的dll删除,如果不用appdomain的话,dll无法删除。
但使用appdomain的话,创建任务时无法识别是ijob类型,只有System.MarshalByRefObject 造成创建任务失败。
var type =Job.GetType();
IJobDetail jobDetail = JobBuilder.Create(type).WithIdentity(key).UsingJobData("ServerName", scheduler.SchedulerName)
.Build();//JobBuilder.Create(type) 使用appdomain后这一句报错。
相关问题
- No SynchronizationContext when calling Await in a
- MYSQL 5.5 Drop Primary Key
- ASP.net UserControl and AppDomain TypeResolve
- Method does not have an implementation when loadin
- Quartz.Net cron trigger to schedule a job every 45
相关文章
- quartz.net 如何实现动态job ,appdomain 域卸载问题
- quartz.net 执行时,并发执行了多次
- AppDomain support is dead in UnityEngine, any way
- Create a WPF “control” that is run in an external
- Marshalling C++ pointer interface back though C# f
- Recover from trigger ERROR state after Job constru
- How to make Quartz.NET process synchronously?
- Why Thread.CurrentContext property and Thread.GetD
3.主程序的job触发,执行自定义的dll里面的定义的job.
伪代码: