setpersistentvar
- Version 9.4.4 and earlier: setpersistentvar() function not available.
- Version 9.4.5 and later: setpersistentvar() function available.
Description
The setpersistentvar() procedure sets a persistent variable in the local database, and synchronizes the value to other specified policy servers. If Registry Name Service is enabled, it synchronizes to all of the other policy servers in the Service Group. If Registry Name Service is not enabled, it synchronizes to all of the other policy servers specified by the submitmasters setting on the current policy server.
Syntax
boolean setpersistentvar(name,value,[expiry])
Arguments
name | Required. The name of the variable to be set. This can be any text string. |
Value | Required. The value of the variable. This can be an integer, string, or list values. |
Expiry | Optional. This is the UNIX epoch (in seconds) of the expiry date of the variable. Suitable values can be calculated using unixtimestamp with additional seconds calculated using Date/Time functions. |
Return Values
A boolean indicating success or failure of the procedure.
setpersistentvar("flag_" + submituser,true,unixtimestamp+300)
For more information, see the following: