[Add clon schedule for restarting site daily clinton@unknownlamer.org**20080213224127 iolib worker threads seem to crash after a few days. Before the ucw developers fix the problem this should work as a workaround. ] { hunk ./src/site-control.lisp 12 +(defvar *golf-restarter* nil + "CLON Scheduler that restarts the site every night") + hunk ./src/site-control.lisp 65 +(defun start-restarter () + (stop-restarter) + (setq *golf-restarter* + (clon:schedule-function (lambda () + (format *debug-io* "Restarting site...") + (restart-site)) + (clon:make-scheduler + (clon:make-typed-cron-schedule :day-of-week '* + :hour 2)) + :thread t :name "ucw server restarter"))) + +(defun stop-restarter () + (if *golf-restarter* + (setq *golf-restarter* + (sb-ext:unschedule-timer *golf-restarter*)))) + hunk ./src/site-control.lisp 105 - (start-reaping))) + (start-reaping) + (start-restarter))) hunk ./src/site-control.lisp 111 + (stop-restarter) }