simple scotty script question

Andy Shelley (andy@is.net)
Mon, 20 Feb 1995 21:07:49 -0500 (EST)

OK, In learning scotty I was trying to get it to hit a portmaster and
return system uptime on a regular interval. Check this:
set kludge { $*
shift
shift
if test -x ../scotty ; then
exec ../scotty -nf $0 ${1+"$@"}
else
exec scotty -nf $0 ${1+"$@"}
fi
}

puts stderr "loading mib"
mib load /usr/portmaster/snmp/living.mib
puts stderr "creating session"
set pm1 [snmp session -address "198.69.177.3"]

### Now, the above all works fine. It's the below that kills me...

job create {puts stderr [$pm1 get "sysUpTime.0"]} 5000
puts stderr "printing joblist"
puts stderr [job list]

The job list that it returns is:
{job0 {puts stderr [$pm1 get "sysUpTime.0"]} 5000 1236758806 0 waiting}

That's one hell of a remaining time.

If I run this one line at a time (excepting kludge, of course) into
scotty running interactively, it works fine.

Clues, please?

andy

-- 
---------------------------------------------------------------
Andy Shelley - SysAdmin/NewsAdmin                                  __0
The Internet Connection 	| andy@is.net	                 -\ <, 
"Where would you like to go today?"  "Back to bed, actually."  (*)/ (*)