Index: branches/eam_branches/ipp-20121130/ippTasks/skycal.pro
===================================================================
--- branches/eam_branches/ipp-20121130/ippTasks/skycal.pro	(revision 34755)
+++ branches/eam_branches/ipp-20121130/ippTasks/skycal.pro	(revision 34839)
@@ -8,4 +8,20 @@
 # test for required global variables
 check.globals
+
+# skcal.pro should have a more restricted polling limit (to avoid stress with getstar)
+if ($?POLL_LIMIT_SKYCAL == 0) set POLL_LIMIT_SKYCAL = 25
+
+macro set.skycal.poll
+  if ($0 != 2)
+    echo "USAGE:set.skycal.poll (value)"
+    break
+  end
+ 
+  $POLL_LIMIT_SKYCAL = $1
+end
+
+macro get.skycal.poll
+  echo "skycal poll limit: $POLL_LIMIT_SKYCAL"
+end
 
 ### Initialise the books containing the tasks to do
@@ -79,5 +95,5 @@
       # save the DB name for the exit tasks
       option $DB:$skycal_DB
-      $run = $run -dbname $DB:$skycal_DB -limit 40
+      $run = $run -dbname $DB:$skycal_DB
       $skycal_DB ++
       if ($skycal_DB >= $DB:n) set skycal_DB = 0
@@ -85,4 +101,5 @@
     add_poll_args run
     add_poll_labels run
+    $run = $run -limit $POLL_LIMIT_SKYCAL
     command $run
   end
@@ -123,8 +140,11 @@
 
   task.exec
+    # if we are unable to run use "long" exectime
+    periods -exec $RUNEXEC
     book npages skycalRun -var N
     if ($N == 0) break
     if ($NETWORK == 0) break
     if ($BURNTOOLING == 1) break
+
 
     # look for new entries in skycalRun (pantaskState == INIT)
@@ -147,5 +167,6 @@
 
     # set the host and workdir based on the skycell hash
-    set.host.for.skycell $SKYCELL_ID
+    # set.host.for.skycell $SKYCELL_ID
+    host anyhost
     set.workdir.by.skycell $SKYCELL_ID $WORKDIR_TEMPLATE $default_host WORKDIR
 
@@ -172,4 +193,6 @@
       echo command $run
     end
+    # since we have work to do shorten exec time
+    periods -exec .1
     command $run
   end
@@ -197,9 +220,9 @@
   host         local
 
-  periods      -poll 60.0
-  periods      -exec 1800.0
+  periods      -poll 10.0
+  periods      -exec 1200.0
   periods      -timeout 120.0
   npending     1
-  active false
+  active true
   
   stdout NULL
