浏览代码

Background script documentation

BigJoe 7 年之前
父节点
当前提交
5423750a05
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      docs/UserManual.md

+ 8 - 1
docs/UserManual.md

@@ -445,8 +445,15 @@ files, ...), check for external resources, remove old log files, etc.
 
 The Lua state remains open until the server is stopped.
 In the future, some callback functions will be available to notify the
-script on changes of the server state.
+script on changes of the server state. See example lua script :
+[background.lua](https://github.com/civetweb/civetweb/blob/master/test/background.lua).
 
+Additional functions available in background script :
+sleep, root path, script name, isterminated
+
+### lua\_background\_script\_params `param1=1,param2=2`
+Can add dynamic parameters to background script.
+Parameters mapped to global 'mg' table 'params' field.
 
 ### websocket\_root
 In case civetweb is built with Lua and websocket support, Lua scripts may