1/6/2023 0 Comments Java itimer![]() ![]() Comparison between this utility and Quartz would be un fair. If we want to try something from JDK itself, in util package we have Timer and TimerTask and these were available from JDK 1.3 It is a no-nonsense, sleek and simple to use api. But try to work towards better than the existing.Ĭonsidering schedulers in java, we have the wonderful Quartz api. When you do something of good quality there is always takers for it, do not worry if it is already existing or not. But they did a fantastic job and came to top. When Google came into market, there were already established players in the field like Yahoo!, Lycos, Ask Jeeves, Alta Vista. I know people will jump on and point out numerous existing apis and say why re-invent the wheel? I really hate the jargon re-inventing the wheel, its one of the most misused one. You can consider this as a project for a summer. So coming up with a nice scheduler api is a quite challenging task. When does it end, after a constant number of executions or after a time is reached like till Friday only.Second type is, the recurring event can start after the completion of previous occurrence.It may be daily / weekly / monthly / yearly / a day of a week / alternate days / only working days. In recurrence there are two types, like all the events will be on a fixed time which is planned at the time of scheduling. ![]() If recurring, what is the periodicity? –.Is it a one time event or a recurring event?.When does the event starts (first time) execution – It may be a day / date / time in future.Similarly a high complex example would be the MS outlook where we can schedule events with a different combination.įollowing are the things in consideration For example take our regular alarm clock where we fix a time and it beeps coming day on the fixed time. The requirement can vary from a single execution on a fixed time to high complex recurring event. When there is a need to trigger a task automatically based on time we should schedule it using a timer api. Last modified on November 13th, 2014 by Joe. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |