Index: trunk/ippTasks/summit.copy.skyprobe.pro
===================================================================
--- trunk/ippTasks/summit.copy.skyprobe.pro	(revision 10064)
+++ trunk/ippTasks/summit.copy.skyprobe.pro	(revision 10064)
@@ -0,0 +1,91 @@
+## PanTasks scripts for Summit Copy
+
+# queue for summit exps that need to be queried
+queueinit pzPendingExp
+# queue for summit imfiles that need to be downloaded
+queueinit pzPendingImfile
+
+# run pzgetexp periodically to populate pzPendingExp
+task	       get.summitExp
+  command      pzgetexp -uri http://otis/ds/skyprobe/ -inst skyprobe -telescope ps1
+  host         local
+
+  # timeout shorter than exec so jobs do not build up
+  periods      -exec     30
+  periods      -poll     10
+  periods      -timeout  30
+
+  task.exit     0
+  end
+
+  task.exit     default
+    # throw an error here
+  end
+end
+
+# build a queue of exps/filesetids that need to be queried
+task	       exp.pending
+    command      pztool -pendingexp -simple
+    host         local
+
+    # timeout shorter than exec so jobs do not build up
+    periods      -exec     30
+    periods      -poll     10
+    periods      -timeout  30
+
+    # success
+    task.exit    0
+        local i Nstdout
+        queuesize stdout -var Nstdout
+        for i 0 $Nstdout
+            queuepop stdout -var line
+            list word -split $line
+            $exp_id     = $word:0
+            $camera     = $word:1
+            $telescope  = $word:2
+            $dateobs    = $word:3
+            $exp_type   = $word:4
+            $uri        = $word:5
+            $imfiles    = $word:6
+            queuepush pzPendingExp -uniq "-uri $uri -filesetid $exp_id -inst $camera -telescope $telescope"
+        end
+    end
+
+    task.exit     default
+        # throw an error here
+    end
+end
+
+# build a queue of imfiles/files that need to be downloaded
+task	       imfile.pending
+    command      pztool -pendingimfile -simple
+    host         local
+
+    # timeout shorter than exec so jobs do not build up
+    periods      -exec     30
+    periods      -poll     10
+    periods      -timeout  30
+
+    # success
+    task.exit    0
+        local i Nstdout
+        queuesize stdout -var Nstdout
+        for i 0 $Nstdout
+            queuepop stdout -var line
+            list word -split $line
+            $exp_id     = $word:0
+            $camera     = $word:1
+            $telescope  = $word:2
+            $bytes      = $word:3
+            $md5sum     = $word:4
+            $class      = $word:5
+            $class_id   = $word:6
+            $uri        = $word:7
+            queuepush pzPendingImfile -uniq "-exp_id $exp_id -inst $camera -telescope $telescope -class $class -class_id $class_id -uri $uri"
+        end
+    end
+
+    task.exit     default
+        # throw an error here
+    end
+end
