DNN调度管理解析(一)-----简单介绍及其API2010-05-20 cnblogs.com sunwangji Baldwin简单介绍调度管理是DNN提供给开发者在一定的时间间隔实现调度任务的一种机制。类似,它也是在提供者模式的基础上实现的,所以可以不更改核心代码就创建新的或修改原有的调度服务。查看有关资料你会发现这是DNN核心团队的成员Dan Caron 的巨大贡献:It was during this time that Dan Caron single-handedly made a significant impact onthe project. Based on his experience with other enterprise portals, he proceeded toadd integrated exception handling and event logging to the application. This addedstability and “auditability”; two major factors in most professional software products.He also added a complex, multithreaded scheduler to the application. The Schedulerwas not just a simple hard-coded implementation like I had seen in other ASP.NETprojects,but rather it was fully configurable via an administration user interface. Thispowerful new feature could be used to run background housekeeping jobs as well aslong-running tasks. With this in place,the extensibility of the application improved yetagain.呵呵,转入正题,由于调度服务是在Web应用程序的环境下运行的,故不可避免会出现中断或掉线的情况,这时调度服务显然会被中止,所以调度服务必然不会24小时的运转着,而只能借助设置一定的时间间隔来执行该调度服务,而DNN的调度任务就是根据已定义的调度日程来执行且只能在程序正常运行时有效,当然你也可以通过具体设置任务执行的频率周期来让调度任务自动执行(该频率属性是以分钟/小时/天来区分的)The APISchedulingProvider($DNNRoot/Components/Providers/Scheduling目录下)于DNN其他提供者类类似,这个调度提供者类为调度程序的实现提供必须的一些方法:

同时声明调度事件委托: