need help in task scheduling in java? [modified]
-
hi friends, currently one of my clients asked me to put an wake up alarm in my web application, so i had successfully putted an applet in my app which works fine with one task i.e. one single call, but my problem is that i have never done scheduling before and hence i have no idea how to solve this problem for a synchronized multiple tasks. i.e. different times as on 9 pm then 11 pm then 12 pm and so on........ i am currently reading and going through the util.timer system so please dont give any beginner reference to that please. Regards Alok sharma
Change of the world happens from within
modified on Tuesday, December 21, 2010 5:04 AM
-
hi friends, currently one of my clients asked me to put an wake up alarm in my web application, so i had successfully putted an applet in my app which works fine with one task i.e. one single call, but my problem is that i have never done scheduling before and hence i have no idea how to solve this problem for a synchronized multiple tasks. i.e. different times as on 9 pm then 11 pm then 12 pm and so on........ i am currently reading and going through the util.timer system so please dont give any beginner reference to that please. Regards Alok sharma
Change of the world happens from within
modified on Tuesday, December 21, 2010 5:04 AM
no thanks, i do not need tasks. I'm currently working on an map based application. Some other programmer (definitely no developer...) didn't validate textfields. Now there is a pretty good chance to ultimately crash the app by entering wired stuff :wtf: :mad: regards, Torsten
I never finish anyth...
-
no thanks, i do not need tasks. I'm currently working on an map based application. Some other programmer (definitely no developer...) didn't validate textfields. Now there is a pretty good chance to ultimately crash the app by entering wired stuff :wtf: :mad: regards, Torsten
I never finish anyth...
wat about an alarm clock to ring on different given times, will you go with map then???
-
wat about an alarm clock to ring on different given times, will you go with map then???
:-D so this was supposed to be a question? I would simply use java.util.calendar and compare that one to the actual date, which is given by creating a new, argument free Instance of the calendar object. Setting a timer would be easy as I can add or subtract time in a quit simple way. Certainly the input of the user needs to be validated, as there is a certain range of valid time inputs. I would leave that one to my custom calendar object. As there is no real DateChooser component or dialog I would certainly go with this one: clickedy. If the date is set as a simple textfield, I would definitely give the user a hint of how to set the date, as there are different forms used depending on which localization the user has. And I would validate the date, which is a bit tricky, because some month do have 30, other do have 31 days and some do have a changing number of days depending on whether it is a leap-year or not. It would be cool to handle this with try/catch and a custom "DateFormException". Also would it be cool to have a scaling GUI with a growing window when the number of timers exceeds the given space in the GUI. Of course would the window just rise to a certain size, as a monitor just has a certain size (variating too!). If the window is minimized, i would push it to the tasks aside the clock. Of course would I prevent the app to be closed before all times have finished. And I would play a sound and push a popup when a timer finishes. And when I finish my homework I would be proud as hell to have done it all by myself ;) regards, Torsten
I never finish anyth...