I am just testing the scheduler on my reporting engine for TeamTrack. I am sure that it will work really well following the bugfix I just put in. I was ignoring the last date that the report ran, and running it from yesterday no matter what. This was wrong. It now uses the start date as the date that when the last report was run, which is how it should be. The only issue at the moment is that it does not matter if the end date for the report is in the future. I need to fix that – minor bug fix.

As I was writing that last sentence, I got an email… The test worked. I set the database up with a last run date of 1st, 2nd and 3rd for three report collections, and let it go. It ran the reports and emailed them to me, and updated the database with the next date as the next start date. This is correct. I can also make the whole engine more efficient. For a given report batch I am doing one database query download for each report run. For a report batch with four reports that means that I am downloading four times as much information as needed. A simple change will reduce the resource requirements to 25%. That is a change for later. I have added them to the ToDo list so they will get done.

I did note that one of the reports said that a particular trip was 15,000KM, in the space of a few minutes, giving an impossible speed. I think this is a bug. For some reason that report is getting the incorrect start position. When there is no GPS location known it uses 0,0. And if you use 0,0 as a start position and a valid end position, the trip in Sydney will be about 15,000 km…

Anyway, enough programmming… Time for breakfast.