Index: branches/eam_branches/ps2-tc3-20130727/ippTasks/pstamp.pro
===================================================================
--- branches/eam_branches/ps2-tc3-20130727/ippTasks/pstamp.pro	(revision 35859)
+++ branches/eam_branches/ps2-tc3-20130727/ippTasks/pstamp.pro	(revision 36680)
@@ -152,4 +152,7 @@
         active true
     end
+    task pstamp.queue.cleanup
+        active true
+    end
 end
 macro pstamp.cleanup.off
@@ -158,4 +161,7 @@
     end
     task pstamp.cleanup.run
+        active false
+    end
+    task pstamp.queue.cleanup
         active false
     end
@@ -825,4 +831,5 @@
         book getword pstampDependent $pageName imagedb    -var IMAGEDB
         book getword pstampDependent $pageName rlabel     -var RLABEL
+        book getword pstampDependent $pageName label      -var LABEL
         book getword pstampDependent $pageName outdir     -var OUTDIR
         book getword pstampDependent $pageName need_magic -var NEED_MAGIC
@@ -846,5 +853,5 @@
         stderr $MYLOGFILE
 
-        $run = pstamp_checkdependent.pl --dep_id $DEP_ID --stage_id $STAGE_ID --stage $STAGE --component $COMPONENT --imagedb $IMAGEDB --rlabel $RLABEL $NEED_MAGIC --fault_count $FAULT_COUNT --max_fault_count $PSTAMP_MAX_FAULT_COUNT --logfile $MYLOGFILE
+        $run = pstamp_checkdependent.pl --dep_id $DEP_ID --stage_id $STAGE_ID --stage $STAGE --component $COMPONENT --imagedb $IMAGEDB --rlabel $RLABEL --label $LABEL $NEED_MAGIC --fault_count $FAULT_COUNT --max_fault_count $PSTAMP_MAX_FAULT_COUNT --logfile $MYLOGFILE
 
         add_standard_args run
@@ -944,5 +951,5 @@
     # overloading nfs
 
-    npending    10
+    npending    5
 
     task.exec
@@ -1118,2 +1125,35 @@
     end
 end
+
+task pstamp.queue.cleanup
+    host        local
+
+    periods     -poll $RUNPOLL
+    periods     -exec 600
+    periods     -timeout 120
+    npending    1
+
+    task.exec
+        stdout NULL
+        stderr $LOGSUBDIR/pstamp.queue.cleanup.log
+
+        $run = pstamp_queue_cleanup.pl
+        command $run
+    end
+
+    task.exit $EXIT_SUCCESS
+        # echo nothing to do
+    end
+
+    task.exit   default
+        showcommand failure
+    end
+
+    task.exit   crash
+        showcommand crash
+    end
+
+    task.exit   timeout
+        showcommand timeout
+    end
+end
