I just finished version 3 of the Task Scheduler interface - make that two task scheduler interfaces, one for XP and one for Vista.
The first version put a wakeup task into the Task Scheduler for each Alert time. Conceivably, you could have scores of tasks in the Task Scheduler just for RxReminder Alerts. It was bulletproof enough; all the scheduled Alerts were in the Task Scheduler, so there was no way the Task Scheduler could miss an Alert. But with possibly dozens or scores or, conceivably, hundreds of RxReminder tasks in the Scheduler, it sure didn't seem very elegant. So I came up with version 2.
Version 2 put just one task in the task scheduler, but it had multiple triggers: one trigger for each Alert time. It seemed like a fine idea, and once again a bulletproof solution - all Alerts had triggers in the RxReminder task - but then I discovered (by experimentation) that there is a maximum value for the number of triggers a task can have. I had both daily and runonce triggers, and when I hit 47 it would take no more triggers. So I came up with version 3.
Version 3 puts one RxReminder task into the Task Scheduler and that task has 3 triggers. When RxReminder is started, and whenever a change is made to its dataset, the program searches for the next med alert and next appointment alert for the current day and adds their times to the RxReminder task triggerlist. And, the RxReminder task also includes a daily trigger at 12 AM. The 12 AM trigger ensures the computer wakes up and runs RxReminder at the start of each day to scan for the first Alert of the day and put its time into the Task Scheduler.
This version is NOT bulletproof, because the Task Scheduler contains only the next Alert for the day and not all scheduled Alerts. But I like this version. It seems to be the most elegant version, and I hope it is the final version.
Oh yeah, I also mowed the yard and washed and dried and folded and put away laundry today. The fun just keeps on coming.
This version is NOT bulletproof, because the Task Scheduler contains only the next Alert for the day and not all scheduled Alerts. But I like this version. It seems to be the most elegant version, and I hope it is the final version.
Oh yeah, I also mowed the yard and washed and dried and folded and put away laundry today. The fun just keeps on coming.
No comments:
Post a Comment