Ns after

From AOLserver Wiki
Jump to: navigation, search

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


NAME

ns_after - Execute a command after a time delay

SYNOPSIS

ns_after seconds script

DESCRIPTION

This command executes a script in the background after a number of seconds time delay. It does this by scheduling a one-shot event in the scheduler. Uncaught script errors will go to the server log. It returns an ID which can be used to unschedule the execution of the script (if seconds hasn't elapsed) using ns_unschedule_proc.
The script when executed will run in the scheduler thread. If the script is long-running, this may interfere with the execution of other scheduled scripts, in which case ns_schedule_proc should be used instead of ns_after.

EXAMPLES

   % ns_after 5 { ns_log notice "ns_after script executed" }
   123

SEE ALSO

ns_info scheduled, ns_pause, ns_resume, ns_schedule_daily, ns_schedule_proc, ns_schedule_weekly, ns_unschedule_proc

-