Difference between revisions of "Ns schedule proc"

From AOLserver Wiki
Jump to navigation Jump to search
m (Reverted edits by Umbrella13 (Talk) to last revision by Patersonmaikl3)
(Undo revision 5678 by Patersonmaikl3 (Talk))
Line 24: Line 24:
 
'''SEE ALSO'''
 
'''SEE ALSO'''
  
: [[ns_after]], [[ns_info]] scheduled, [[ns_pause]], [http://www.rushessay.com essay], [http://www.standoutessay.com/essay-writers essay writers], [[ns_resume]], [[ns_schedule_daily]], [[ns_schedule_weekly]], [[ns_unschedule_proc]]
+
: [[ns_after]], [[ns_info]] scheduled, [[ns_pause]], [http://www.rushessay.com essay], [[ns_resume]], [[ns_schedule_daily]], [[ns_schedule_weekly]], [[ns_unschedule_proc]]
  
 
----
 
----
  
 
[[Category:Documentation]] - [[Category:Core Tcl API]]
 
[[Category:Documentation]] - [[Category:Core Tcl API]]

Revision as of 14:24, 15 March 2010

Man page: http://aolserver.com/docs/tcl/ns_schedule_proc.html


NAME

ns_schedule_proc - Schedule a script to run after a certain number of seconds

SYNOPSIS

ns_schedule_proc ?-once? ?-thread? interval script

DESCRIPTION

This command schedules a script to be run after a certain number of seconds. Returns the ID of the newly scheduled script. If -once is specified, then the script is run once and then unscheduled, otherwise it will continue to run every interval seconds. If -thread is specified, then the script will be run in its own thread, otherwise it will run in the scheduler's thread. If the script is long-running, this may interfere with the running of other scheduled scripts, so long-running scripts should be run in their own threads.

EXAMPLES

   % set id [[ns_schedule_proc -once 60 { ns_log notice "this should run in 60 seconds" }]]
   123
   % ns_unschedule_proc $id

SEE ALSO

ns_after, ns_info scheduled, ns_pause, essay, ns_resume, ns_schedule_daily, ns_schedule_weekly, ns_unschedule_proc

-