Index: /tags/ipp-20110622/ippTasks/diskbalance.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/diskbalance.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/diskbalance.pro	(revision 31855)
@@ -180,12 +180,10 @@
 
   task.exec
+    # if we are unable to run the 'exec', use a long retry time
+    periods -exec 5
+
     book npages balancePending -var N
     if ($NETWORK == 0) break
-    if ($N == 0)
-        periods -exec 5
-        break
-    end
-    # Reset the speed if we're doing something
-    periods -exec 0.5
+    if ($N == 0) break
 
     # look for new objects in balancePending
@@ -214,4 +212,5 @@
 	echo command $run
     end
+    periods -exec 0.05
     command $run
   end
Index: /tags/ipp-20110622/ippTasks/dist.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/dist.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/dist.pro	(revision 31855)
@@ -244,12 +244,10 @@
 
   task.exec
+    periods -exec 10
+
+    book npages distToProcess -var N
+    if ($N == 0) break
     if ($NETWORK == 0) break
-    book npages distToProcess -var N
-    if ($N == 0) 
-        periods -exec 10
-        break
-    end
-    periods -exec 0.05
-    
+   
     # look for new components to process (pantaskState == INIT)
     book getpage distToProcess 0 -var pageName -key pantaskState INIT
@@ -326,4 +324,5 @@
       echo command $run
     end
+    periods -exec 0.05
     command $run
   end
Index: /tags/ipp-20110622/ippTasks/fake.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/fake.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/fake.pro	(revision 31855)
@@ -121,12 +121,10 @@
 
   task.exec
+    # if we are unable to run the 'exec', use a long retry time
+    periods -exec $RUNEXEC
+
     # fake is fast, so generate a bunch of commands in a row
     book npages fakePendingImfile -var N
-    if ($N == 0)
-       periods -exec $RUNEXEC
-       break
-    end
-    periods -exec 0.05
-
+    if ($N == 0) break
     if ($NETWORK == 0) break
     
@@ -172,4 +170,6 @@
       echo command $run
     end
+    # if we are able to run the 'exec', use a short retry time
+    periods -exec 0.05
     command $run
   end
Index: /tags/ipp-20110622/ippTasks/lossy_compress.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/lossy_compress.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/lossy_compress.pro	(revision 31855)
@@ -122,11 +122,9 @@
 
     task.exec
+        periods -exec $RUNEXEC
+
+	book npages compPendingCompress -var N
+	if ($N == 0) break
 	if ($NETWORK == 0) break
-	book npages compPendingCompress -var N
-	if ($N == 0) 
-	    periods -exec $RUNEXEC
-	    break
-	end
-	periods -exec 0.05
 
 	# look for new images
@@ -171,4 +169,5 @@
 	    echo command $run
 	end
+	periods -exec 0.05
 	command $run
     end
@@ -248,11 +247,9 @@
 
     task.exec
+        periods -exec $RUNEXEC
+
+	book npages compPendingClean -var N
+	if ($N == 0) break
 	if ($NETWORK == 0) break
-	book npages compPendingClean -var N
-	if ($N == 0) 
-	    periods -exec $RUNEXEC
-	    break
-	end
-	periods -exec 0.05
 
 	# look for new images
@@ -297,4 +294,5 @@
 	    echo command $run
 	end
+	periods -exec 0.05
 	command $run
     end
Index: /tags/ipp-20110622/ippTasks/magic.cleanup.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/magic.cleanup.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/magic.cleanup.pro	(revision 31855)
@@ -116,9 +116,8 @@
 
   task.exec
+    periods -exec $RUNEXEC
+
     book npages magicToCleanup -var N
-    if ($N == 0) 
-        periods -exec $RUNEXEC
-        break
-    end
+    if ($N == 0) break
     if ($NETWORK == 0) break
     
Index: /tags/ipp-20110622/ippTasks/magic.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/magic.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/magic.pro	(revision 31855)
@@ -269,11 +269,8 @@
 
   task.exec
+    periods -exec 10
+
     book npages magicToProcess -var N
-    if ($N == 0) 
-      periods -exec 10
-      break
-    end
-    periods -exec 0.05
-
+    if ($N == 0) break
     if ($NETWORK == 0) break
     
@@ -342,4 +339,5 @@
       echo command $run
     end
+    periods -exec 0.05
     command $run
   end
Index: /tags/ipp-20110622/ippTasks/pstamp.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/pstamp.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/pstamp.pro	(revision 31855)
@@ -512,12 +512,10 @@
 
     task.exec
+        periods -exec $RUNEXEC
+
         stdout NULL
         stderr $LOGSUBDIR/pstamp.job.run.log
         book npages pstampJob -var N
-        if ($N == 0) 
-            periods -exec $RUNEXEC
-            break
-        end
-        periods -exec 0.05
+        if ($N == 0) break
         
         book getpage pstampJob 0 -var pageName -key pantaskState INIT
@@ -548,4 +546,5 @@
             echo command $run
         end
+        periods -exec 0.05
         command $run
     end
@@ -681,10 +680,8 @@
 
     task.exec
+        periods -exec $RUNEXEC
+
         book npages pstampDependent -var N
-        if ($N == 0) 
-            periods -exec $RUNEXEC
-            break
-        end
-        periods -exec 0.05
+        if ($N == 0) break
         
         book getpage pstampDependent 0 -var pageName -key pantaskState INIT
@@ -729,4 +726,5 @@
             echo command $run
         end
+        periods -exec 0.05
         command $run
     end
@@ -820,10 +818,8 @@
 
     task.exec
+        periods -exec $RUNEXEC
+
         book npages pstampCleanup -var N
-        if ($N == 0) 
-            periods -exec $RUNEXEC
-            break
-        end
-        periods -exec 0.05
+        if ($N == 0) break
         
         book getpage pstampCleanup 0 -var pageName -key pantaskState INIT
@@ -854,4 +850,5 @@
             echo command $run
         end
+        periods -exec 0.05
         command $run
     end
Index: /tags/ipp-20110622/ippTasks/rcserver.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/rcserver.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/rcserver.pro	(revision 31855)
@@ -110,11 +110,8 @@
 
   task.exec
+    periods -exec 10
+
     book npages rcPendingFS -var N
-    if ($N == 0)
-        periods -exec 10
-        break
-    end
-    periods -exec 0.05
-
+    if ($N == 0) break
     if ($NETWORK == 0) break
     
@@ -153,4 +150,5 @@
       echo command $run
     end
+    periods -exec 0.05
     command $run
   end
Index: /tags/ipp-20110622/ippTasks/register.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/register.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/register.pro	(revision 31855)
@@ -271,11 +271,9 @@
 
   task.exec
+    periods -exec $RUNEXEC
+
+    book npages regPendingImfile -var N
+    if ($N == 0) break
     if ($NETWORK == 0) break
-    book npages regPendingImfile -var N
-    if ($N == 0)
-        periods -exec $RUNEXEC
-        break
-    end
-    periods -exec 0.05 
     
     # look for new images in regPendingImfile
@@ -331,4 +329,5 @@
       echo command $run
     end
+    periods -exec 0.05 
     command $run
   end
@@ -636,11 +635,9 @@
 
   task.exec
+    periods -exec $RUNEXEC
+
+    book npages regPendingBurntoolImfile -var N
+    if ($N == 0) break
     if ($NETWORK == 0) break
-    book npages regPendingBurntoolImfile -var N
-    if ($N == 0) 
-      periods -exec $RUNEXEC
-      break
-    end
-    periods -exec 0.05
 
     # look for new images to burn in regPendingBurntoolImfile
@@ -673,4 +670,5 @@
       echo command $run
     end
+    periods -exec 0.05
     command $run
   end
Index: /tags/ipp-20110622/ippTasks/replicate.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/replicate.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/replicate.pro	(revision 31855)
@@ -154,11 +154,9 @@
 
   task.exec
+    periods -exec 5
+
     book npages replicatePending -var N
+    if ($N == 0) break
     if ($NETWORK == 0) break
-    if ($N == 0)
-        periods -exec 5
-        break
-    end
-    periods -exec 0.05
     
     # look for new objects in replicatePending
@@ -190,4 +188,5 @@
       echo command $run
     end
+    periods -exec 0.05
     command $run
   end
Index: /tags/ipp-20110622/ippTasks/science.cleanup.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/science.cleanup.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/science.cleanup.pro	(revision 31855)
@@ -114,9 +114,8 @@
 
   task.exec
+    periods -exec $RUNEXEC
+
     book npages chipPendingCleanup -var N
-    if ($N == 0) 
-        periods -exec $RUNEXEC
-        break
-    end
+    if ($N == 0) break
     if ($NETWORK == 0) break
     
@@ -574,9 +573,8 @@
 
   task.exec
+    periods -exec $RUNEXEC
+
     book npages warpPendingCleanup -var N
-    if ($N == 0) 
-        periods -exec $RUNEXEC
-        break
-    end
+    if ($N == 0) break
     if ($NETWORK == 0) break
     
@@ -730,9 +728,8 @@
 
   task.exec
+    periods -exec $RUNEXEC
+
     book npages diffCleanup -var N
-    if ($N == 0) 
-        periods -exec $RUNEXEC
-        break
-    end
+    if ($N == 0) break
     if ($NETWORK == 0) break
     
@@ -1031,9 +1028,8 @@
 
   task.exec
+    periods -exec $RUNEXEC
+
     book npages chipBGPendingCleanup -var N
-    if ($N == 0) 
-        periods -exec $RUNEXEC
-        break
-    end
+    if ($N == 0) break
     if ($NETWORK == 0) break
     
@@ -1185,9 +1181,8 @@
 
   task.exec
+    periods -exec $RUNEXEC
+
     book npages warpBGPendingCleanup -var N
-    if ($N == 0) 
-        periods -exec $RUNEXEC
-        break
-    end
+    if ($N == 0) break
     if ($NETWORK == 0) break
     
Index: /tags/ipp-20110622/ippTasks/summit.copy.pro
===================================================================
--- /tags/ipp-20110622/ippTasks/summit.copy.pro	(revision 31854)
+++ /tags/ipp-20110622/ippTasks/summit.copy.pro	(revision 31855)
@@ -284,13 +284,10 @@
 
     task.exec
-        if ($NETWORK == 0) break
+        periods -exec 20
 
         # if we are waiting on data, make the interval long
         book npages pzPendingExp -var N
-        if ($N == 0)
-            periods -exec 20
-            break
-        end
-        periods -exec 0.05
+        if ($N == 0) break
+        if ($NETWORK == 0) break
 
         # find an exp that needs imfiles fetched
@@ -321,4 +318,5 @@
           echo command $run
         end
+        periods -exec 0.05
         command $run
     end
@@ -408,13 +406,10 @@
 
     task.exec
-        if ($NETWORK == 0) break
+        periods -exec 20
 
         # if we are waiting on data, make the interval long
         book npages pzPendingImfile -var N
-        if ($N == 0)
-            periods -exec 20
-            break
-        end
-        periods -exec 0.05
+        if ($N == 0) break
+        if ($NETWORK == 0) break
 
         # find an exp that needs imfiles fetched
@@ -502,4 +497,5 @@
 	# More debug:
 #	echo "DEBUG2: " $run
+        periods -exec 0.05
         command $run
     end
@@ -609,13 +605,10 @@
 
     task.exec
-        if ($NETWORK == 0) break
+        periods -exec 20
 
         # if we are waiting on data, make the interval long
         book npages pzPendingAdvance -var N
-        if ($N == 0)
-            periods -exec 20
-            break
-        end
-        periods -exec 0.05
+        if ($N == 0) break
+        if ($NETWORK == 0) break
 
         # find an exp that needs imfiles fetched
@@ -661,4 +654,5 @@
           echo command $run
         end
+        periods -exec 0.05
         command $run
     end
