Index: /trunk/Ohana/src/opihi/pantasks/CheckJobs.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/CheckJobs.c	(revision 4450)
+++ /trunk/Ohana/src/opihi/pantasks/CheckJobs.c	(revision 4451)
@@ -34,8 +34,8 @@
 
       case JOB_CRASH:
-	fprintf (stderr, "job %s (%d) crash\n", job[0].task[0].name, job[0].JobID);
 	/* run task[0].crash macro, if it exists */
 	/* set the stdout and stderr variables with job.stdout, job.stderr */
 	/* XXX this will break on 0 values in output streams */
+	fprintf (stderr, "job %s (%d) crash\n", job[0].task[0].name, job[0].JobID);
 	set_str_variable ("stdout", job[0].stdout.buffer);
 	set_str_variable ("stderr", job[0].stderr.buffer);
@@ -49,4 +49,6 @@
       case JOB_EXIT:
 	fprintf (stderr, "job %s (%d) exit\n", job[0].task[0].name, job[0].JobID);
+	set_str_variable ("stdout", job[0].stdout.buffer);
+	set_str_variable ("stderr", job[0].stderr.buffer);
 	/* run corresponding task[0].exit macro, if it exists */
 	macro = job[0].task[0].def;
Index: /trunk/Ohana/src/opihi/pantasks/ControllerOps.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/ControllerOps.c	(revision 4450)
+++ /trunk/Ohana/src/opihi/pantasks/ControllerOps.c	(revision 4451)
@@ -64,5 +64,4 @@
   char *p;
   IOBuffer buffer;
-  
 
   sprintf (cmd, "check job %d", job[0].pid);
@@ -179,4 +178,7 @@
   job[0].pid = atoi (string);
   FreeIOBuffer (&buffer);
+
+  InitIOBuffer (&job[0].stdout, 0x100);
+  InitIOBuffer (&job[0].stderr, 0x100);
   return (TRUE);
 }
Index: /trunk/Ohana/src/opihi/pantasks/LocalJob.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/LocalJob.c	(revision 4450)
+++ /trunk/Ohana/src/opihi/pantasks/LocalJob.c	(revision 4451)
@@ -15,5 +15,5 @@
   pid = fork ();
   if (!pid) { /* must be child process */
-    fprintf (stderr, "starting controller connection\n");
+    fprintf (stderr, "starting local job\n");
 
     /* close the other ends of the pipes */
@@ -45,4 +45,6 @@
   job[0].pid = pid;
 
+  InitIOBuffer (&job[0].stdout, 0x100);
+  InitIOBuffer (&job[0].stderr, 0x100);
   return (TRUE);
 
Index: /trunk/Ohana/src/opihi/pantasks/task.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/task.c	(revision 4450)
+++ /trunk/Ohana/src/opihi/pantasks/task.c	(revision 4451)
@@ -1,3 +1,2 @@
-# include "basic.h"
 # include "scheduler.h"
 # define prompt "> "
Index: /trunk/Ohana/src/opihi/pantasks/task_command.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/task_command.c	(revision 4450)
+++ /trunk/Ohana/src/opihi/pantasks/task_command.c	(revision 4451)
@@ -1,3 +1,2 @@
-# include "basic.h"
 # include "scheduler.h"
 
Index: /trunk/Ohana/src/opihi/pantasks/task_host.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/task_host.c	(revision 4450)
+++ /trunk/Ohana/src/opihi/pantasks/task_host.c	(revision 4451)
@@ -1,3 +1,2 @@
-# include "basic.h"
 # include "scheduler.h"
 
Index: /trunk/Ohana/src/opihi/pantasks/task_macros.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/task_macros.c	(revision 4450)
+++ /trunk/Ohana/src/opihi/pantasks/task_macros.c	(revision 4451)
@@ -1,3 +1,2 @@
-# include "basic.h"
 # include "scheduler.h"
 # define D_NLINES 100
Index: /trunk/Ohana/src/opihi/pantasks/task_periods.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/task_periods.c	(revision 4450)
+++ /trunk/Ohana/src/opihi/pantasks/task_periods.c	(revision 4451)
@@ -1,3 +1,2 @@
-# include "basic.h"
 # include "scheduler.h"
 
Index: /trunk/Ohana/src/opihi/scripts/sched.pro
===================================================================
--- /trunk/Ohana/src/opihi/scripts/sched.pro	(revision 4450)
+++ /trunk/Ohana/src/opihi/scripts/sched.pro	(revision 4451)
@@ -1,15 +1,28 @@
 
-task foo
-  command ls foo baz
-  periods -poll 2.0
-  periods -exec 1.0
-  periods -timeout 5.0
-  host kiawe
+task test
+  command sched.test 
+  periods -poll 1.0
+  periods -exec 2.0
+  periods -timeout 2.0
+  host local
+  # local is default 
+
+  task.exec
+    echo "starting job sched.test"
+  end
 
   task.exit 0
+    echo stdout: $stdout
+    echo stderr: $stderr
+    exec echo "foo bar" >> failure.log
+    output test.log
+    echo $stdout
+    output stdout
     echo "successful job"
   end
 
   task.exit 1
+    echo stdout: $stdout
+    echo stderr: $stderr
     echo "failed job"
   end
@@ -22,7 +35,3 @@
     echo "job timed out"
   end
-
-  task.exec
-    echo "starting job foo"
-  end
 end
