Index: trunk/ippTasks/calibration.pro
===================================================================
--- trunk/ippTasks/calibration.pro	(revision 19461)
+++ trunk/ippTasks/calibration.pro	(revision 19465)
@@ -57,5 +57,5 @@
 
   # define the command (does not depend on previous queries)
-  if ($DB:n == 0)
+  if ($DB:n != 0)
     command caltool -dbs -active true
   else
Index: trunk/ippTasks/camera.pro
===================================================================
--- trunk/ippTasks/camera.pro	(revision 19461)
+++ trunk/ippTasks/camera.pro	(revision 19465)
@@ -73,5 +73,5 @@
 
   task.exec
-    $run = camtool -pendingexp -limit 20
+    $run = camtool -pendingexp
     if ($DB:n == 0)
       option DEFAULT
@@ -204,5 +204,5 @@
 
   task.exec
-    $run = camtool -pendingcleanuprun -limit 20
+    $run = camtool -pendingcleanuprun
     if ($DB:n == 0)
       option DEFAULT
Index: trunk/ippTasks/chip.pro
===================================================================
--- trunk/ippTasks/chip.pro	(revision 19461)
+++ trunk/ippTasks/chip.pro	(revision 19465)
@@ -76,5 +76,5 @@
 
   task.exec
-    $run = chiptool -pendingimfile -limit 20
+    $run = chiptool -pendingimfile
     if ($DB:n == 0)
       option DEFAULT
@@ -207,5 +207,5 @@
 
   task.exec
-    $run = chiptool -pendingcleanuprun -limit 20
+    $run = chiptool -pendingcleanuprun
     if ($DB:n == 0)
       option DEFAULT
Index: trunk/ippTasks/detrend.correct.pro
===================================================================
--- trunk/ippTasks/detrend.correct.pro	(revision 19461)
+++ trunk/ippTasks/detrend.correct.pro	(revision 19465)
@@ -71,14 +71,16 @@
 
   task.exec
+    $run = dettool -tocorrectedimfile
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -tocorrectedimfile -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingCorrectedImfile_DB
-      command dettool -tocorrectedimfile -limit 20 -dbname $DB:$detPendingCorrectedImfile_DB
+      $run = $run -dbname $DB:$detPendingCorrectedImfile_DB
       $detPendingCorrectedImfile_DB ++
       if ($detPendingCorrectedImfile_DB >= $DB:n) set detPendingCorrectedImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -192,14 +194,16 @@
 
   task.exec
+    $run = dettool -tocorrectedexp
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -tocorrectedexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingCorrectedExp_DB
-      command dettool -tocorrectedexp -limit 20 -dbname $DB:$detPendingCorrectedExp_DB
+      $run = $run -dbname $DB:$detPendingCorrectedExp_DB
       $detPendingCorrectedExp_DB ++
       if ($detPendingCorrectedExp_DB >= $DB:n) set detPendingCorrectedExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
Index: trunk/ippTasks/detrend.norm.pro
===================================================================
--- trunk/ippTasks/detrend.norm.pro	(revision 19461)
+++ trunk/ippTasks/detrend.norm.pro	(revision 19465)
@@ -137,14 +137,16 @@
 
   task.exec
+    $run = dettool -tonormalizedstat
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -tonormalizedstat -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingNormStatImfile_DB
-      command dettool -tonormalizedstat -limit 20 -dbname $DB:$detPendingNormStatImfile_DB
+      $run = $run -dbname $DB:$detPendingNormStatImfile_DB
       $detPendingNormStatImfile_DB ++
       if ($detPendingNormStatImfile_DB >= $DB:n) set detPendingNormStatImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -247,14 +249,16 @@
 
   task.exec
+    $run = dettool -tonormalize
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -tonormalize -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingNormImfile_DB
-      command dettool -tonormalize -limit 20 -dbname $DB:$detPendingNormImfile_DB
+      $run = $run -dbname $DB:$detPendingNormImfile_DB
       $detPendingNormImfile_DB ++
       if ($detPendingNormImfile_DB >= $DB:n) set detPendingNormImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -360,14 +364,16 @@
 
   task.exec
+    $run = dettool -tonormalizedexp
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -tonormalizedexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingNormExp_DB
-      command dettool -tonormalizedexp -limit 20 -dbname $DB:$detPendingNormExp_DB
+      $run = $run -dbname $DB:$detPendingNormExp_DB
       $detPendingNormExp_DB ++
       if ($detPendingNormExp_DB >= $DB:n) set detPendingNormExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -469,14 +475,16 @@
 
   task.exec
+    $run = dettool -pendingcleanup_normalizedstat
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -pendingcleanup_normalizedstat -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detCleanupNormStatImfile_DB
-      command dettool -pendingcleanup_normalizedstat -limit 20 -dbname $DB:$detCleanupNormStatImfile_DB
+      $run = $run -dbname $DB:$detCleanupNormStatImfile_DB
       $detCleanupNormStatImfile_DB ++
       if ($detCleanupNormStatImfile_DB >= $DB:n) set detCleanupNormStatImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -573,14 +581,16 @@
 
   task.exec
+    $run = dettool -pendingcleanup_normalizedimfile
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -pendingcleanup_normalizedimfile -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detCleanupNormImfile_DB
-      command dettool -pendingcleanup_normalizedimfile -limit 20 -dbname $DB:$detCleanupNormImfile_DB
+      $run = $run -dbname $DB:$detCleanupNormImfile_DB
       $detCleanupNormImfile_DB ++
       if ($detCleanupNormImfile_DB >= $DB:n) set detCleanupNormImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -678,14 +688,16 @@
 
   task.exec
+    $run = dettool -pendingcleanup_normalizedexp
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -pendingcleanup_normalizedexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detCleanupNormExp_DB
-      command dettool -pendingcleanup_normalizedexp -limit 20 -dbname $DB:$detCleanupNormExp_DB
+      $run = $run -dbname $DB:$detCleanupNormExp_DB
       $detCleanupNormExp_DB ++
       if ($detCleanupNormExp_DB >= $DB:n) set detCleanupNormExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
Index: trunk/ippTasks/detrend.process.pro
===================================================================
--- trunk/ippTasks/detrend.process.pro	(revision 19461)
+++ trunk/ippTasks/detrend.process.pro	(revision 19465)
@@ -105,14 +105,16 @@
 
   task.exec
+    $run = dettool -toprocessedimfile
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -toprocessedimfile -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingProcessedImfile_DB
-      command dettool -toprocessedimfile -limit 20 -dbname $DB:$detPendingProcessedImfile_DB
+      $run = $run -dbname $DB:$detPendingProcessedImfile_DB
       $detPendingProcessedImfile_DB ++
       if ($detPendingProcessedImfile_DB >= $DB:n) set detPendingProcessedImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -222,14 +224,16 @@
 
   task.exec
+    $run = dettool -toprocessedexp
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -toprocessedexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingProcessedExp_DB
-      command dettool -toprocessedexp -limit 20 -dbname $DB:$detPendingProcessedExp_DB
+      $run = $run -dbname $DB:$detPendingProcessedExp_DB
       $detPendingProcessedExp_DB ++
       if ($detPendingProcessedExp_DB >= $DB:n) set detPendingProcessedExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -336,14 +340,16 @@
 
   task.exec
+    $run = dettool -pendingcleanup_processedimfile
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -pendingcleanup_processedimfile -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detCleanupProcessedImfile_DB
-      command dettool -pendingcleanup_processedimfile -limit 20 -dbname $DB:$detCleanupProcessedImfile_DB
+      $run = $run -dbname $DB:$detCleanupProcessedImfile_DB
       $detCleanupProcessedImfile_DB ++
       if ($detCleanupProcessedImfile_DB >= $DB:n) set detCleanupProcessedImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -442,14 +448,16 @@
 
   task.exec
+    $run = dettool -pendingcleanup_processedexp
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -pendingcleanup_processedexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detCleanupProcessedExp_DB
-      command dettool -pendingcleanup_processedexp -limit 20 -dbname $DB:$detCleanupProcessedExp_DB
+      $run = $run -dbname $DB:$detCleanupProcessedExp_DB
       $detCleanupProcessedExp_DB ++
       if ($detCleanupProcessedExp_DB >= $DB:n) set detCleanupProcessedExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
Index: trunk/ippTasks/detrend.reject.pro
===================================================================
--- trunk/ippTasks/detrend.reject.pro	(revision 19461)
+++ trunk/ippTasks/detrend.reject.pro	(revision 19465)
@@ -52,14 +52,16 @@
 
   task.exec
+    $run = dettool -todetrunsummary
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -todetrunsummary -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detRejectExp_DB
-      command dettool -todetrunsummary -limit 20 -dbname $DB:$detRejectExp_DB
+      $run = $run -dbname $DB:$detRejectExp_DB
       $detRejectExp_DB ++
       if ($detRejectExp_DB >= $DB:n) set detRejectExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
Index: trunk/ippTasks/detrend.resid.pro
===================================================================
--- trunk/ippTasks/detrend.resid.pro	(revision 19461)
+++ trunk/ippTasks/detrend.resid.pro	(revision 19465)
@@ -100,14 +100,16 @@
 
   task.exec
+    $run = dettool -toresidimfile
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -toresidimfile -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingResidImfile_DB
-      command dettool -toresidimfile -limit 20 -dbname $DB:$detPendingResidImfile_DB
+      $run = $run -dbname $DB:$detPendingResidImfile_DB
       $detPendingResidImfile_DB ++
       if ($detPendingResidImfile_DB >= $DB:n) set detPendingResidImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -221,14 +223,16 @@
 
   task.exec
+    $run = dettool -toresidexp
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -toresidexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingResidExp_DB
-      command dettool -toresidexp -limit 20 -dbname $DB:$detPendingResidExp_DB
+      $run = $run -dbname $DB:$detPendingResidExp_DB
       $detPendingResidExp_DB ++
       if ($detPendingResidExp_DB >= $DB:n) set detPendingResidExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -335,14 +339,16 @@
 
   task.exec
+    $run = dettool -pendingcleanup_residimfile
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -pendingcleanup_residimfile -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detCleanupResidImfile_DB
-      command dettool -pendingcleanup_residimfile -limit 20 -dbname $DB:$detCleanupResidImfile_DB
+      $run = $run -dbname $DB:$detCleanupResidImfile_DB
       $detCleanupResidImfile_DB ++
       if ($detCleanupResidImfile_DB >= $DB:n) set detCleanupResidImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -442,14 +448,16 @@
 
   task.exec
+    $run = dettool -pendingcleanup_residexp
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -pendingcleanup_residexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detCleanupResidExp_DB
-      command dettool -pendingcleanup_residexp -limit 20 -dbname $DB:$detCleanupResidExp_DB
+      $run = $run -dbname $DB:$detCleanupResidExp_DB
       $detCleanupResidExp_DB ++
       if ($detCleanupResidExp_DB >= $DB:n) set detCleanupResidExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
Index: trunk/ippTasks/detrend.stack.pro
===================================================================
--- trunk/ippTasks/detrend.stack.pro	(revision 19461)
+++ 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
 
Index: trunk/ippTasks/diff.pro
===================================================================
--- trunk/ippTasks/diff.pro	(revision 19461)
+++ trunk/ippTasks/diff.pro	(revision 19465)
@@ -81,5 +81,5 @@
 
   task.exec
-    $run = difftool -todiffskyfile -limit 20
+    $run = difftool -todiffskyfile
     if ($DB:n == 0)
       option DEFAULT
@@ -205,5 +205,5 @@
 
   task.exec
-    $run = difftool -pendingcleanuprun -limit 20
+    $run = difftool -pendingcleanuprun
     if ($DB:n == 0)
       option DEFAULT
Index: trunk/ippTasks/fake.pro
===================================================================
--- trunk/ippTasks/fake.pro	(revision 19461)
+++ trunk/ippTasks/fake.pro	(revision 19465)
@@ -73,5 +73,5 @@
 
   task.exec
-    $run = faketool -pendingimfile -limit 20
+    $run = faketool -pendingimfile
     if ($DB:n == 0)
       option DEFAULT
@@ -196,5 +196,5 @@
 
   task.exec
-    $run = faketool -pendingcleanuprun -limit 20
+    $run = faketool -pendingcleanuprun
     if ($DB:n == 0)
       option DEFAULT
Index: trunk/ippTasks/flatcorr.pro
===================================================================
--- trunk/ippTasks/flatcorr.pro	(revision 19461)
+++ trunk/ippTasks/flatcorr.pro	(revision 19465)
@@ -114,13 +114,14 @@
 
   # define the command (does not depend on previous queries)
-  if ($DB:n == 0)
-    command flatcorr -pendingprocess
-  else
+  $run = flatcorr -pendingprocess
+  if ($DB:n != 0)
     # save the DB name for the exit tasks
     option $DB:$flatcorr_pendingprocess_DB
-    command flatcorr -pendingprocess -dbname $DB:$flatcorr_pendingprocess_DB
+    $run = $run -dbname $DB:$flatcorr_pendingprocess_DB
     $flatcorr_pendingprocess_DB ++
     if ($flatcorr_pendingprocess_DB >= $DB:n) set flatcorr_pendingprocess_DB = 0
   end
+  add_poll_args run
+  command $run
 
   # silently drop stdout
Index: trunk/ippTasks/pantasks.pro
===================================================================
--- trunk/ippTasks/pantasks.pro	(revision 19461)
+++ trunk/ippTasks/pantasks.pro	(revision 19465)
@@ -7,4 +7,5 @@
 $VERBOSE = 1
 $LABEL = "NONE"
+$POLLLIMIT = 32
 $LOGDIR = `pwd`
 $LOGDIR = $LOGDIR/pantasks_logs
@@ -192,5 +193,5 @@
 
     local command
-    $command = $$1
+    $command = $$1 -limit $POLLLIMIT
 
     # Only process the data with the specified label.
Index: trunk/ippTasks/register.pro
===================================================================
--- trunk/ippTasks/register.pro	(revision 19461)
+++ trunk/ippTasks/register.pro	(revision 19465)
@@ -71,14 +71,16 @@
   # iff the DB list is not set, use the value defined in .ipprc
   task.exec
+    $run = regtool -pendingimfile
     if ($DB:n == 0)
       option DEFAULT
-      command regtool -pendingimfile -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$regPendingImfile_DB
-      command regtool -pendingimfile -limit 20 -dbname $DB:$regPendingImfile_DB
+      $run = $run -dbname $DB:$regPendingImfile_DB
       $regPendingImfile_DB ++
       if ($regPendingImfile_DB >= $DB:n) set regPendingImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -198,14 +200,16 @@
 
   task.exec
+    $run = regtool -pendingexp
     if ($DB:n == 0)
       option DEFAULT
-      command regtool -pendingexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$regPendingExp_DB
-      command regtool -pendingexp -limit 20 -dbname $DB:$regPendingExp_DB
+      $run = $run -dbname $DB:$regPendingExp_DB
       $regPendingExp_DB ++
       if ($regPendingExp_DB >= $DB:n) set regPendingExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
Index: trunk/ippTasks/stack.pro
===================================================================
--- trunk/ippTasks/stack.pro	(revision 19461)
+++ trunk/ippTasks/stack.pro	(revision 19465)
@@ -81,5 +81,5 @@
 
   task.exec
-    $run = stacktool -tosum -limit 20
+    $run = stacktool -tosum
     if ($DB:n == 0)
       option DEFAULT
@@ -206,5 +206,5 @@
 
   task.exec
-    $run = stacktool -pendingcleanuprun -limit 20
+    $run = stacktool -pendingcleanuprun
     if ($DB:n == 0)
       option DEFAULT
Index: trunk/ippTasks/warp.pro
===================================================================
--- trunk/ippTasks/warp.pro	(revision 19461)
+++ trunk/ippTasks/warp.pro	(revision 19465)
@@ -96,5 +96,5 @@
 
   task.exec
-    $run = warptool -tooverlap -limit 20
+    $run = warptool -tooverlap
     if ($DB:n == 0)
       option DEFAULT
@@ -209,5 +209,5 @@
 
   task.exec
-    $run = warptool -towarped -limit 20
+    $run = warptool -towarped
     if ($DB:n == 0)
       option DEFAULT
@@ -328,5 +328,5 @@
 
   task.exec
-    $run = warptool -pendingcleanuprun -limit 20
+    $run = warptool -pendingcleanuprun
     if ($DB:n == 0)
       option DEFAULT
