Alarm Clock / Scheduler I have found the need for some kind of scheduled task management in many projects I've worked on. Here is a reasonably flexible framework for scheduling tasks to be performed at specified times, with the option of making them recurring (repeating). It includes several useful extension points:
The framework provides some default implementations of these as well as a threaded management component that handles triggering of alarm tasks at the proper time(s). It is very easy to use (examples are included in the form of the AlarmTest class): just create instances of AlarmTask and add them to an AlarmManager, associated with an AlarmSchedule. Important
credit: I adapted this code from an open-source package I downloaded
severl years ago called JDRing. I have not recently been able to find
the original source web site of JDRing, so I am releasing this modified
(improved & cleaned-up, hopefully :-) version into the wild in case
it is useful to anyone. This code is provided as-is, with no warranty expressed or implied. Download alarm.zip (source code included) |
All photographs and content is copyright © 2003-2006 Eric Rizzo & Jazmine Rizzo |