Schedule a procedure to run once a week
ns_schedule_weekly ?-thread? ?-once? day hour minute {script | procname ?args?}
ns_schedule_weekly runs the specified Tcl script or procedure (procname) once a week on the day specified by day and the time specified by hour and minute. The day can be from 0 to 6, where 0 represents Sunday. The hour can be from 0 to 23, and the minute can be from 0 to 59.
Specify -thread if you want a thread created to run the procedure. This will allow the scheduler to continue with other scheduled procedures. Specifying -thread is appropriate in situations where the script will not return immediately, such as when the script performs network activity.
Specify -once if you want the script to run only one time. The default is that the script will be re-scheduled after each time it is run.
ns_schedule_weekly returns an id number for the scheduled procedure that is needed to stop the scheduled procedure with ns_unschedule_proc.