簡單介紹
調度管理是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其他提供者類類似,這個調度提供者類為調度程序的實現提供必須的一些方法:
同時聲明調度事件委托: