Download DOWNLOAD
Forums FORUMS
Blogs BLOGS
Forge FORGE
Help HELP
Marketplace MARKETPLACE
DotNetNuke Home
You are here >   Development > Release Management > Roadmap > Scheduler
Register  |  Login
Purchase

Enhancement

Scheduler utility for background batch processing of portal jobs.

User Story

We currently have two tasks that run on another thread, fired from APPLICATION_START, to run procedures regularly. Users Online runs every minute, clearing out objects in memory, moving them to the database. Site Log runs once per day, purging the site logs.

There is a need to schedule additional tasks, and rather than hardcoding the tasks in APPLICATION_START, we need to provide a means of scheduling, managing and monitoring tasks through a user interface. We should also make it easy to allow 3rd party modules to register a process to run on the schedule. A user interface should allow admins to view the schedule history for each task and any details about each task run.

Acceptance Tests

1. When APPLICATION_START is fired, scheduler should start. Verify this by going to HOST > Schedule and select the action "Schedule Status". Verify that the status is not SCHEDULER_STOPPED.

2. Refresh the Schedule Status screen several times to verify the scheduled tasks are firing when required. There is a column that displays the time remaining until the next time the task is fired...keep an eye on this column as you refresh to see it change and eventually reset when the task is run.

3. Select the action "View History" to verify that the tasks are being logged.

Engineering Tasks

1. Build the Scheduler using the provider model, providing the ability to replace it without modifying core code.

2. It needs to be multi-threaded allowing short running tasks to run along-side of long running tasks. The fact that we will have a lot of short running tasks that will run every minute/few minutes makes this a good candidate for a thread pool. This will promote the reuse of threads within the pool. Every method that reads/writes custom business objects or shared properties will need to be multi-thread safe.

3. Create a SchedulerClient class that must be inherited from in order to schedule a task. The SchedulerClient will lay the foundation for the methods, properties and constructors that are required by the Scheduler.

4. Rewrite the code in APPLICATION_START in global.asax.vb for UsersOnline and SiteLog. Create a new class for each, inheriting from SchedulerClient.

5. Remove the code for UsersOnline and SiteLog in APPLICATION_START of global.asax.vb and replace it with an method call that invokes the scheduler.

Owner

Dan Caron

Resources

DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation

Hosted by MaximumASP