【发布时间】:2012-06-22 11:37:25
【问题描述】:
我正在使用 Quartz .NET 开发简单的调度程序。我想 Quartz 将所有作业和触发器保存在数据库中,所以我设置了 AdoJobStore 和 “正常”作业它可以正常工作。
现在,我在反序列化数据库通用作业时遇到了问题。我有课:
class DefaultJob<TEventType, TArgsType> : IJob{
public void Execute(IJobExecutionContext context)
{
//do sth
}
}
使用 RamJobStore 和 DefaultJob 一切正常 - 调度和运行工作。
使用 AdoJobStore 和 DefaultJob 我可以安排,Quartz 将它保存到数据库中(我可以通过 Management Studio 看到它),但是当它尝试从数据库中恢复它时,我得到:
A first chance exception of type 'System.ArgumentException' occurred in mscorlib.dll
A first chance exception of type 'Quartz.JobPersistenceException' occurred in Quartz.dll
A first chance exception of type 'Quartz.JobPersistenceException' occurred in Quartz.dll
我调试了 JobFactory,根本没有调用 NewJob 方法。在它之前发生了一些错误。
有人可以帮忙吗?
【问题讨论】:
标签: c# generics scheduler quartz.net jobs