1 Reply Latest reply on Feb 11, 2009 4:42 AM by Newsgroup_User

    Overlapping Scheduled Task Iterations

    NateWells
      I have a scheduled task set up to run every 61 seconds. Each iteration has a timeout of 600 seconds, and can take two or three minutes to complete. The task is implemented in such a way that each iteration is independent of the others, allowing the iterations to safely overlap each other, giving the process some rudimentary parallel processing and thus improving the total throughput beyond what can be achieved synchronously.

      We are upgrading to ColdFusion 8 soon, so I am evaluating this task on ColdFusion 8. When I check the scheduler.log file which ColdFusion 8 is producing, it does not appear that this process is actually being run in overlapping iterations. This is in contrast to how I have experienced ColdFusion scheduled tasks to work in the past, as well as comments made on another thread in this forum. We are using ColdFusion 8 Standard Edition; could this be a limitation of the Standard Edition?

      Below is an excerpt from the log. It shows that the task was executed only 4 times in a span of 12 minutes, instead of the expected 12 iterations.


      Activating2 on Tue Feb 10 15:20:05 CST 2009 To run on Tue Feb 10 15:21:06 CST 2009"
      Executing at Tue Feb 10 15:21:06 CST 2009"
      Rescheduling for :Tue Feb 10 15:24:09 CST 2009 Now: Tue Feb 10 15:23:24 CST 2009"
      Executing at Tue Feb 10 15:24:09 CST 2009"
      Rescheduling for :Tue Feb 10 15:27:12 CST 2009 Now: Tue Feb 10 15:26:38 CST 2009"
      Executing at Tue Feb 10 15:27:12 CST 2009"
      Rescheduling for :Tue Feb 10 15:30:15 CST 2009 Now: Tue Feb 10 15:29:33 CST 2009"
      Executing at Tue Feb 10 15:30:15 CST 2009"
      Rescheduling for :Tue Feb 10 15:33:18 CST 2009 Now: Tue Feb 10 15:32:51 CST 2009"
        • 1. Re: Overlapping Scheduled Task Iterations
          Level 7
          NateWells wrote:
          > I have a scheduled task set up to run every 61 seconds. Each iteration has a
          > timeout of 600 seconds, and can take two or three minutes to complete. The
          > task is implemented in such a way that each iteration is independent of the
          > others, allowing the iterations to safely overlap each other, giving the
          > process some rudimentary parallel processing and thus improving the total
          > throughput beyond what can be achieved synchronously.

          It looks like CF8 waits for the scheduled task to finish before starting
          a new one...

          But you can use threads (CFTHREAD) to run more then 1 thread in you
          scheduled task (Standard edition is limited to 2 additional threads I
          think).

          --
          Mack