Index: /trunk/ippTasks/warp.pro
===================================================================
--- /trunk/ippTasks/warp.pro	(revision 24040)
+++ /trunk/ippTasks/warp.pro	(revision 24041)
@@ -339,4 +339,54 @@
 end
 
+# this variable will cycle through the known database names
+$warp_advance_DB = 0
+
+# advance exposures for which all imfiles have completed processing
+# sets the exposure state to full and queues warp processing if requested
+task	       warp.advancerun
+  host         local
+
+  periods      -poll $LOADPOLL
+  periods      -exec 30
+  periods      -timeout 60
+  npending     1
+
+  stdout NULL
+  stderr $LOGDIR/warp.advancerun.log
+
+  task.exec
+    $run = warptool -advancerun -limit 10
+    if ($DB:n == 0)
+      option DEFAULT
+    else
+      # save the DB name for the exit tasks
+      option $DB:$warp_advance_DB
+      $run = $run -dbname $DB:$warp_advance_DB
+      $warp_advance_DB ++
+      if ($warp_advance_DB >= $DB:n) set warp_advance_DB = 0
+    end
+    add_poll_args run
+    command $run
+  end
+
+  # success
+  task.exit    0
+  end
+
+  # locked list
+  task.exit    default
+    showcommand failure
+  end
+
+  task.exit    crash
+    showcommand crash
+  end
+
+  # operation times out?
+  task.exit    timeout
+    showcommand timeout
+  end
+end
+
 # select images ready for warp analysis
 # new entries are added to warpPendingImfile
