<update-script/>

The update-script section controls the automated script launcher built into the SNFMulti engine. When SNF detects a new rulebase is ready during a SYNC session, then this feature allows SNF to launch a script or other lightweight application via a standard system() call. The script should (at least) download and authenticate the newer rulebase file and then remove the UpdateReady.txt semaphore file (also created by this mechanism) when it is successful.

Note About Spaces: Be sure to treat spaces carefully in your script call. For example, on Win* systems you will want to use tilde to remove spaces from path names. Use c:\progra~1\someplace instead of C:\Program Files\someplace.

Note How To Trigger The Script: The update mechanism is triggered whenever the active rulebase file is older than the rulebase file available from our servers. To trigger the update mechanism change the timestamp on your local .snf file and wait (about a minute) for a SYNC to occur. SNF should detect the newer timestamp at our servers during the next SYNC and trigger the update mechanism. Be mindful of the guard-time -- by default the update script can only be launched once every 3 minutes or so.

The automated script launcher will continue to retry this operation until it is successful. The operation is successful when the rulebase file loaded into the SNFMulti engine is at least as new as the one reported available during the latest SYNC session.

<update-script on-off='on' call='getRulebase.cmd' guard-time='180'/>

The on-off='on' attribute enables this feature. on-off='off' disables the feature. Note that even if the automated script launcher is disabled the UpdateReady.txt semaphore file will still be created when a newer rulebase file is available for download. This is so that external update mechanisms can operate even when the internal script launcher is disabled. If the external update mechanism is not aware of the UpdateReady.txt semaphore (not recommended) then there is no harm. The UpdateReady.txt file will simply be overwritten periodically -- it will not grow in size.

The call='getRulebase.cmd' attribute describes the command that will be launched using the system() call. Normally this attribute should be set to the full path to the script which will download the new rulebase file. Leaving off the full path to the script (just including the name like getRulebase.cmd) can lead to problems. Without the full path SNF may not be able to locate the script. If your SNF workspace, scripts, and rulebase file all reside in c:\SNF, for example, then this attribute should be set like: call='c:\SNF\getRulebase.cmd'. On a *nix system where SNF typically resides in /var/spool/snfilter, the attribute might be set like: call='/var/spool/snfilter/getRulebase'.

The guard-time='180' attribute establishes the amount of time SNF must wait between retries. The default is 180 seconds (3 minutes). This is a safety feature that prevents a broken script or configuration from causing SNF to rapidly call system() in a tight loop. This also provides a reasonable time to wait in case the rulebase delivery server is busy or otherwise unreachable on a previous attempt.

Please email support@armresearch.com with any questions.

Related Topics