ad_schedule_proc
one of
the documented procedures in this
installation of the ACS
Usage:
ad_schedule_proc
{
-thread f
-once f
-debug t
}
interval
proc
args
What it does:
Replacement for ns_schedule_proc, allowing us to track what's going on. Can be monitored via /admin/monitoring/schedule-procs.tcl.
Defined in:
/web/photonet/tcl/ad-utilities.tcl.preload
Source code:
arg_parser_for_ad_schedule_proc $args
# Protect the list of scheduled procs with a mutex.
ns_mutex lock [nsv_get ad_procs mutex]
set proc_info [list $thread $once $interval $proc $args [ns_time] 0 $debug]
# ns_log "Notice" "Scheduling proc $proc"
# Add to the list of scheduled procedures, for monitoring.
set procs [nsv_get ad_procs .]
lappend procs $proc_info
nsv_set ad_procs . $procs
ns_mutex unlock [nsv_get ad_procs mutex]
set my_args [list]
if { $thread == "t" } {
lappend my_args "-thread"
}
if { $once == "t" } {
lappend my_args "-once"
}
# Schedule the wrapper procedure (ad_run_scheduled_proc).
eval [concat [list ns_schedule_proc] $my_args [list $interval ad_run_scheduled_proc [list $proc_info]]]