Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. need help in task scheduling in java? [modified]

need help in task scheduling in java? [modified]

Scheduled Pinned Locked Moved Java
helpjavatutorialquestionlearning
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alok Sharma ji
    wrote on last edited by
    #1

    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

    T 1 Reply Last reply
    0
    • A Alok Sharma ji

      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

      T Offline
      T Offline
      TorstenH
      wrote on last edited by
      #2

      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...

      A 1 Reply Last reply
      0
      • T TorstenH

        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...

        A Offline
        A Offline
        Alok Sharma ji
        wrote on last edited by
        #3

        wat about an alarm clock to ring on different given times, will you go with map then???

        T 1 Reply Last reply
        0
        • A Alok Sharma ji

          wat about an alarm clock to ring on different given times, will you go with map then???

          T Offline
          T Offline
          TorstenH
          wrote on last edited by
          #4

          :-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...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups