Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
util:jsexec [2010/03/18 01:18] digitalmanutil:jsexec [2010/04/15 14:23] – Links to custom:js changed to custom:javascript digitalman
Line 1: Line 1:
 ====== JSexec ====== ====== JSexec ======
  
-JSexec may be used to execute some Synchronet JavaScript files (e.g. ''*.js'', ''*.ssjs'') externally from Synchronet+JSexec may be used to execute some Synchronet JavaScript files (e.g. ''*.js'', ''*.ssjs'') externally from Synchronet.
  
-:!NoteSynchronet installation is required, though JSexec will execute scripts successfully even when Synchronet is not running.+===== Uses ===== 
 +  * Persistent execution of static services (e.g. [[:service:ircd]]) independent of Synchronet  
 +  * Background execution of timed events (e.g. [[:module:newslink]]) 
 +  * Command-line execution of sysop functions (e.g. [[:module:makeguest]]) 
 +  * [[:howto:apache|CGI]] generated dynamic HTML 
 + 
 +===== Independence ===== 
 + 
 +Synchronet installation is required for JSexec to function, though JSexec will execute scripts successfully even when Synchronet is not running.
  
 ===== Command Line ===== ===== Command Line =====
Line 36: Line 44:
         -!             wait for keypress (pause) on error         -!             wait for keypress (pause) on error
 </file> </file>
 +
 +==== Module ====
 +The ''module'' argument is optional if the standard input stream (''stdin'') is not a console (''tty''), allowing for [[#shebang]] support on Unix-like operating systems.
  
 ===== Additional Properties ===== ===== Additional Properties =====
Line 55: Line 66:
  
 FIXME FIXME
 +
 +===== shebang =====
 +
 +JSexec for non-Windows platforms will ignore the first line of the interpreted script if it begins with ''#!'', allowing for a [[wp>shebang (Unix)]] style script file where the first line of the script is something like:
 +<file>
 +#!/sbbs/exec/jsexec -c/sbbs/ctrl
 +</file>
 +
 +This allows JSexec scripts to be executed easily via [[:howto:apache|CGI]] as well as other command-line conveniences on Unix-like operating systems.
  
 ===== See Also ===== ===== See Also =====
-  * [[:custom:js|JavaScript]]+  * [[custom:javascript|JavaScript]]
   * [[:howto:apache|How To Use Apache HTTP Server with Synchronet]]   * [[:howto:apache|How To Use Apache HTTP Server with Synchronet]]
   * [[:util:|Utilities]]   * [[:util:|Utilities]]
  
 {{tag>javascript jsexec customization}} {{tag>javascript jsexec customization}}