Hi,
I've developed a number (4) of my own custom tasks that are scheduled via the Host->Schedule menu. After monitoring the schedule history I noticed something weird and I dont know why its happening. It losks like the scheduler is running multiple instances. There is multiple entries in the schedule history for each of my tasks. For example even though each of my tasks is set to run every 5 minutes I get something like this in the history (see below) - note how closely the events are occuring. After the expected (5 minute) interval has elapsed there will be another batch of entries in the log. (There could be as many as 9 entries per batch - I've truncated them for brevity).
Description |
Duration |
Succeeded |
Start/End/Next |
CompanyName.ModuleName.MyTask1Class,CompanyName.ModuleName
My task completed successfully message |
0 |
True |
S: 12/08/2010 16:12:19
E: 12/08/2010 16:12:19
N: 12/08/2010 16:17:19 |
CompanyName.ModuleName.MyTask1Class,CompanyName.ModuleName
My task completed successfully message |
0 |
True |
S: 12/08/2010 16:12:18
E: 12/08/2010 16:12:18
N: 12/08/2010 16:17:18 |
CompanyName.ModuleName.MyTask1Class,CompanyName.ModuleName
My task completed successfully message |
0 |
True |
S: 12/08/2010 16:12:18
E: 12/08/2010 16:12:18
N: 12/08/2010 16:17:18 |
CompanyName.ModuleName.MyTask1Class,CompanyName.ModuleName
My task completed successfully message |
0 |
True |
S: 12/08/2010 16:12:16
E: 12/08/2010 16:12:16
N: 12/08/2010 16:17:16 |
CompanyName.ModuleName.MyTask1Class,CompanyName.ModuleName
My task completed successfully message |
0.147 |
True |
S: 12/08/2010 16:12:15
E: 12/08/2010 16:12:15
N: 12/08/2010 16:17:15 |
Perhaps someone has an idea as to what's up? First some background on how I've configured things.
All my task classes are part of a single assembly (e.g. CompanyName.ModuleName.dll). In the scheduler my tasks are configured like this:
The Full Class Name and Assembly setting for each of the tasks is similar (differing in the class name only). For example:
CompanyName.ModuleName.MyTask1Class,CompanyName.ModuleName
CompanyName.ModuleName.MyTask2Class,CompanyName.ModuleName
CompanyName.ModuleName.MyTask3Class,CompanyName.ModuleName
CompanyName.ModuleName.MyTask4Class,CompanyName.ModuleName
Each has a Time Lapse setting of 5 Minutes and a Retry Frequency of 2 minutes.
In the Object Dependencies field I entered the name of a custom table that the events are all dependent on. Essentially each of the my events (tasks) is reponsible for querying a defined subset of records from the table and updating some values if some condition is met. A single row will only be ever be updated by one task (i.e. no 2 tasks will ever try to update the same row).
I have configured it such that the DotNetNuke Scheduler is running on Timer mode (Host->Host Settings->Other Settings->Scheduler Mode).
I developed the tasks by following the documentation (e.g. Inheriting from DotNetNuke.Services.Scheduling.SchedulerClient, making sure ScheduleHistoryItem.Succeeded is set etc.). I've stepped through my code as well (on my dev PC by attaching to the asp.net process) and no errors are occuring.
Thanks