Index: trunk/Ohana/src/opihi/pantasks/CheckTasks.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/CheckTasks.c	(revision 11055)
+++ trunk/Ohana/src/opihi/pantasks/CheckTasks.c	(revision 11317)
@@ -16,14 +16,31 @@
 
     /* need to check if the current time is within valid/invalid periods */
-    if (!CheckTimeRanges (task[0].ranges, task[0].Nranges)) continue;
-    if (task[0].Nmax && (task[0].Njobs >= task[0].Nmax)) continue;
-    if (task[0].NpendingMax && (task[0].Npending >= task[0].NpendingMax)) continue;
+    if (!CheckTimeRanges (task[0].ranges, task[0].Nranges)) {
+	gettimeofday (&task[0].last, (void *) NULL);
+	continue;
+    }
+    if (task[0].Nmax && (task[0].Njobs >= task[0].Nmax)) {
+	gettimeofday (&task[0].last, (void *) NULL);
+	continue;
+    }
+    if (task[0].NpendingMax && (task[0].Npending >= task[0].NpendingMax)) {
+	gettimeofday (&task[0].last, (void *) NULL);
+	continue;
+    }
+
+    /* check if there are errors with this task */
+    if (!ValidateTask (task, TRUE)) { 
+	gettimeofday (&task[0].last, (void *) NULL);
+	continue;
+    }
 
     /* ready to run? : run task.exec macro */
     if (task[0].exec != NULL) {
       status = exec_loop (task[0].exec);
-      if (!status) continue;
+      if (!status) {
+	  gettimeofday (&task[0].last, (void *) NULL);
+	  continue;
+      }
     }
-    if (!ValidateTask (task, TRUE)) continue;
 
     /* construct job from task */
