RESTART 4D
RESTART 4D {( time {; message} )}
Parameter | Type | Description | |
---|---|---|---|
time | Integer | → | Time delay (seconds) before 4D restarts |
message | Text | → | Text to display on client machines |
Description
The RESTART 4D command restarts the current 4D application.
This command is mainly intended for use in the context of a merged application (client/server or single-user) and in conjunction with the SET UPDATE FOLDER command. In this case, the automatic update process is launched: the new version of the application designated by SET UPDATE FOLDER automatically replaces the current version at the time of the restart resulting from RESTART 4D. The pathname of the data file is saved and used automatically.
If no update information was specified using the SET UPDATE FOLDER command in the current session, the command simply restarts the 4D application with the current structure and data files.
You can use the time parameter to defer restarting the application in order to give client machines time to disconnect. You must pass a value in seconds for the time. If you omit this parameter, the server application waits, for a maximum of 10 minutes, for all the client applications to be disconnected. After that, all client applications are automatically disconnected.
Note: The time and message parameters are only taken into account with server applications (they are ignored if the command is executed in a single-user or remote application).
The optional message parameter displays a custom message for connected client applications.
If the command is executed correctly, the OK system variable is set to 1; otherwise, it is set to 0 and the application restarts. You can intercept any errors generated by the command using a method installed using the ON ERR CALL command.