This is an old revision of the document!
Table of Contents
JSexec
JSexec may be used to execute some Synchronet JavaScript files (e.g. *.js
, *.ssjs
) externally from Synchronet
Note: a Synchronet installation is required, though JSexec will execute scripts successfully even when Synchronet is not running.
Command Line
usage: jsexec [-opts] [path]module[.js] [args] available opts: -c<ctrl_dir> specify path to Synchronet CTRL directory -m<bytes> set maximum heap size (default=8388608 bytes) -s<bytes> set context stack size (default=16384 bytes) -S<bytes> set thread stack limit (default=262144, 0=unlimited) -b<limit> set branch limit (default=99999999, 0=unlimited) -y<interval> set yield interval (default=10000, 0=never) -g<interval> set garbage collection interval (default=100, 0=never) -h[hostname] use local or specified host name (instead of SCFG value) -u<mask> set file creation permissions mask (in octal) -L<level> set log level (default=7) -E<level> set error log level threshold (default=4) -i<path_list> set load() comma-sep search path list (default="load") -f use non-buffered stream for console messages -a append instead of overwriting message output files -e<filename> send error messages to file in addition to stderr -o<filename> send console messages to file instead of stdout -n send status messages to NUL instead of stderr -q send console messages to NUL instead of stdout -v display version details and exit -x disable auto-termination on local abort signal -l loop until intentionally terminated -p wait for keypress (pause) on exit -! wait for keypress (pause) on error
Additional Properties
Additional properties available to JavaScript scripts running from JSexec:
Property | Type | Description |
---|---|---|
jsexec_revision | string | CVS revision of JSexec (example: "1.135" ) |
jsexec_revision_detail | string | Verbose details about the JSexec build (example: "JSexec 1.136 Debug Compiled Mar 15 2010 11:13:53 with GCC 3.4.2" ) |
env | string[] | Associative array of system environment variables (example: env["shell"]="/bin/bash" ) |
conio
JSexec includes an instance of a special Console Input/Output class called conio
.
uifc
JSexec includes an instance of a special User Interface class called uifc
.