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