Index: trunk/ippTasks/detrend.stack.pro
===================================================================
--- trunk/ippTasks/detrend.stack.pro	(revision 19126)
+++ trunk/ippTasks/detrend.stack.pro	(revision 19465)
@@ -70,14 +70,16 @@
 
   task.exec
+    $run = dettool -tostacked
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -tostacked -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingStackedImfile_DB
-      command dettool -tostacked -limit 20 -dbname $DB:$detPendingStackedImfile_DB
+      $run = $run -dbname $DB:$detPendingStackedImfile_DB
       $detPendingStackedImfile_DB ++
       if ($detPendingStackedImfile_DB >= $DB:n) set detPendingStackedImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -184,14 +186,16 @@
 
   task.exec
+    $run = dettool -pendingcleanup_stacked
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -pendingcleanup_stacked -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detCleanupStackedImfile_DB
-      command dettool -pendingcleanup_stacked -limit 20 -dbname $DB:$detCleanupStackedImfile_DB
+      $run = $run -dbname $DB:$detCleanupStackedImfile_DB
       $detCleanupStackedImfile_DB ++
       if ($detCleanupStackedImfile_DB >= $DB:n) set detCleanupStackedImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
