Index: trunk/ippTasks/phase0.pro
===================================================================
--- trunk/ippTasks/phase0.pro	(revision 8691)
+++ trunk/ippTasks/phase0.pro	(revision 9032)
@@ -6,4 +6,10 @@
 ## STATE EXP_KEY CLASS CLASS_ID URI-FITS
 ## queue keys are counted from 0
+
+queueinit Phase0PendingImfiles
+queueinit Phase0PendingExposures
+if ($?network == 0)
+  $network = 1
+end
 
 # select images ready for phase0 analysis
@@ -18,7 +24,12 @@
   periods      -timeout 30
 
+  stdout phase0.imfile.log
+  stderr phase0.imfile.log
+
   # success
   task.exit    0
     local i Nqueue
+
+    # save stdout and stderr
 
     # compare output with Phase0PendingImfiles queue
@@ -35,16 +46,11 @@
 
   # locked list
-  task.exit    1
-    echo       "phase0 pending imfiles: exec failure"
-  end
-
-  # default exit status
-  task.exit    default
-    echo       "phase0 pending imfiles: unknown exit status: $EXIT"
-  end
-
-  # operation times out?
-  task.exit    timeout
-    echo       "phase0 pending imfiles: timeout"
+  task.exit    default
+    echo "*** phase0 pending imfiles: failure"
+  end
+
+  # operation times out?
+  task.exit    timeout
+    echo "*** phase0 pending imfiles: timeout"
   end
 end
@@ -70,5 +76,5 @@
     queuepush Phase0PendingImfiles -replace -key 1 "RUN $line"
 
-    ## the Phase0PendingImfiles queue contains:
+    ## the Phase0PendingImfiles queue contains (line has popped STATE)
     ## STATE EXP_KEY CLASS CLASS_ID URI-FITS
     list word -split $line
@@ -82,9 +88,19 @@
     # host alala -required 
     ## XXX need to determine the appropriate host
-    host anyhost
+    # host anyhost
+    host local
+    echo "running phase0.imfile.process"
+
+    echo "setting stdout, stderr: $word:1.$word:3.log"
+    # do something better with this output target
+    stdout $word:0.$word:2.log
+    stderr $word:0.$word:2.log
 
     # create the command line
+    echo "setting options $line"
     options "$line"
-    command phase0imfile.pl $word:1 $word:3 $word:$4
+
+    echo command phase0imfile.pl --exp_id $word:0 --class_id $word:2 --uri $word:3
+    command phase0imfile.pl --exp_id $word:0 --class_id $word:2 --uri $word:3
   end
 
@@ -120,4 +136,11 @@
   periods      -exec 5
   periods      -timeout 30
+
+  stdout phase0.exp.log
+  stderr phase0.exp.log
+
+  task.exec
+    break
+  end
 
   # success
@@ -137,12 +160,7 @@
   end
 
-  # locked list
-  task.exit    1
-    echo       "phase0 pending exp: exec failure"
-  end
-
   # default exit status
   task.exit    default
-    echo       "phase0 pending exp: unknown exit status: $EXIT"
+    echo       "phase0 pending exp: failure"
   end
 
@@ -177,4 +195,8 @@
     list word -split $line
 
+    # do something better with this output target
+    stdout $word:1.log
+    stderr $word:1.log
+
     # specify choice of remote host:
     # 'anyhost' specifies random remote host
@@ -185,5 +207,6 @@
     # host alala -required 
     ## XXX need to determine the appropriate host
-    host anyhost
+    host local
+    # host anyhost
 
     # create the command line
