COMMAND (for auto logout)

This is an element of AUTO_LOGOUT that provides a mechanism for the Genero Application Server to override an application's auto logout.

Syntax

<COMMAND Timeout=seconds>command-script</COMMAND>
  1. The Timeout attribute specifies a timeout value. In the seconds parameter you specify a number of seconds as the time allowed for the command process to complete. If the system does not respond within this time, the GAS terminates the command process.
  2. command-script is the name of the script or command to be run. You specify in this a check for conditions that would override the auto logout. An exit code value of zero is returned, if the auto logout is to be overridden, otherwise a non-zero value is returned.

Child elements

There are no child elements.

Usage

Use the COMMAND option to override the auto logout process. The command could be used, for example, to only allow auto logout between the hours of 21.00 pm and 08.00 am. This means that there would be no auto logout during work hours.

Usage example

<COMMAND Timeout="20">auto-logout-allowed.sh</COMMAND> 
In the example, the command runs a shell script that determines whether the auto logout takes place. The timeout for the command is set to 20 seconds. Table 1 shows how the command and the timeout can affect the auto logout.
Table 1. How the command affects auto logout
Scenario Exit code Result
The script runs. Condition to override auto logout is valid. A zero exit code is returned. The auto logout does not occur. The application keeps running.
The script runs. Condition to override auto logout is not valid. A non-zero exit code is returned The auto logout occurs as usual and stops the application.
The script may or may not run. The GAS times out the command process. A non-zero exit code is returned The auto logout occurs as usual and stops the application.

Parent elements

This element is a child of the following: