2 Replies Latest reply on Nov 20, 2008 3:36 PM by jfrankman

    Are scheduled asynchrounous methos persisted?

      We have an asynchronous method that is scheduled to run every week. At first the method was scheduled for every Monday (the expire time was Jan 1 2099):


      jobWeeklyScheduler.scheduleWeeklyImport(Calendar.getInstance().getTime(), "0 0 12 ? * MON", expireCalendar.getTime());



      Here is signature of the method:


              @Asynchronous
              public void scheduleWeeklyImport(
                      @Expiration
                      final Date when, 
                      @IntervalCron
                      final String cron, 
                      @FinalExpiration
                      final Date endDate)


             
      We later changed the above line of code to schedule the method to run on tuesdays instead of mondays:


      jobWeeklyScheduler.scheduleWeeklyImport(Calendar.getInstance().getTime(), "0 0 12 ? * TUE", expireCalendar.getTime());



      However, after restarting JBoss the method gets executed on Mondays and Tuesdays even though the code only schedules it to run on Tuesdays.


      I have a few questions that I would appreciate it if anyone can help me out:


      A. Are asynchronous methods that get scheduled persisted by JBoss?


      B. Is there a way as an administrator to check what methods are scheduled to run?


      C. Is there a way to cancel or terminate and method that is scheduled to run?