Announcement Announcement Module
Collapse
No announcement yet.
Stopping a scheduler Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stopping a scheduler

    Hi

    I am unable to figure out how to stop a scheduler automatically when the jobs have finished working.

    Thanks a lot
    Prabodh Prakash

  • #2
    Why would you want o stop a scheduler ? Scheduler is supposed to schedule a task at a certain interval correct ? If it is a one time thing use a executable jar or something like that.

    Comment


    • #3
      Hi

      We need to run the batch in off business hours and it will happen only once per week. Thus, we need to stop scheduler, after the batch completes processing. We can start the scheduler manually per week.

      Thanks a lot
      Prabodh Prakash

      Comment


      • #4
        Thats easy use a @Scheduled(cron ="....") expression to run the job every day, once a week etc etc.
        Check out
        http://static.springsource.org/sprin...cheduling.html

        Comment


        • #5
          Thanks Sambaran

          I know about these expressions. However, what I would like to know in more detail is, how to stop a scheduler automatically after finishing the job. So, my concern is that the frequency of the batch is very less and I don't want it to keep running. So, for a job frequency of once per month, it is useless to keep the scheduler running.

          So, I want my scheduler to automatically stop, once the jobs have finished execution.

          -
          PP

          Comment


          • #6
            If management of the scheduler is your issue why don't you use a managed thread from your application server ? Like the TimerManger in WAS .

            Comment

            Working...
            X