1 Reply Latest reply on Mar 3, 2004 9:40 AM by oldblue

    How to delay start of scheduled task??

    oldblue

      I finally figured out how to configure scheduled tasks. I have two separate tasks that will be polling databases. I would like to stagger them so they aren't both polling at the same time. I also need them to not start polling until the rest of my app (in an ear file) is deployed.

      Questions:
      1. How can I delay the start of the scheduled tasks until after the ear file is fully deployed?
      2. What is the best way to stagger the tasks so that I know they will not be polling at the same time?

      Thanks!!

        • 1. Re: How to delay start of scheduled task??
          oldblue

          Got it. Just had to add some "depends" tags for each of the five beans in the jar (w/in the ear) that these scheduled tasks depend on.

          Staggered the tasks by setting the initialStartDates to 0 and 150000 respectively, with the schedulePeriod set to 300000. (Each task runs at 5 minute intervals offset by 2.5 minutes.)