On 2005.06.13, Janine Sisk <[EMAIL PROTECTED]> wrote:
> # from Michael Cleverly:
> # 
> http://www.opennsd.org/bboard/q-and-a-fetch-msg.tcl?msg_id=00005n&topic_id=1&topic=OpenNSD
>
> proc roll_logs {} {
>   set server_name [ns_info server]
>   set yesterday [ns_fmttime [expr [ns_time] - 86400] %Y-%m-%d]
>   set access_file_name [ns_config ns/server/${server_name}/module/nslog
> File]
>
>   # access log
>   ns_accesslog roll $access_file_name.$yesterday
>   # server log
>   ns_logroll
> }
>
> ns_share -init {set schedule_roll 0} schedule_roll
> if {!$schedule_roll} {
>   ns_schedule_daily 0 0 roll_logs
>   ns_log Notice "roll_logs for [ns_info server] has been scheduled at
> 12:00 am."
> }

Am I missing something, or where do you ever set schedule_roll to
something other than 0?

Still, this Tcl shouldn't get sourced in more than once at server
start-up anyway.  It shouldn't be getting executed once per thread
and/or interp init.  Unless, in some other .tcl file, you have something
that goes and iterates over all the files in your Tcl libraries and does
some [source]'ing of files on interp init or somesuch.

-- Dossy

--
Dossy Shiobara                       mail: [EMAIL PROTECTED]
Panoptic Computer Network             web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to