Application Programming Interface Guide > Server Actions > Server Actions Reference > ShutdownServer
 
ShutdownServer
Shut down the server.
If the server is already shutting down, the server is shut down immediately. If this shutdown action was not directly requested by the monitor, the monitor reports it as an unplanned shutdown.
ShutdownServer is an asynchronous call that attempts to complete its processing and return prior to commencement of the shutdown. Because it is possible for the connection to be interrupted before the action can be completed, you can specify delayMs to postpone when shutdown begins.
The server attempts to shut down as cleanly as possible. However, if doing so takes longer than timeoutMs milliseconds after the end of delayMs, the server is immediately shut down. Therefore, if both arguments are specified, the maximum time for the server to be shut down is delayMs plus timeoutMs.
Arguments
delayMs (LONG; optional): The number of milliseconds to wait before shutting down. A delayMs of less than or equal to 0 means no delay. Default is 0 ms.
timeoutMs (LONG; optional): The number of milliseconds to wait before forcing a hard shutdown. If timeoutMs is negative, the server is allowed to take as long as it needs to shut down. If timeoutMs is 0, the server is shut down without waiting. Default is 10000 ms.
Fault
Security: If the caller does not have ACCESS_TOOLS and MODIFY_ALL_STATUS rights.