When the system shuts down, it will wait a short time (generally between 5 to 20 seconds) for the services to terminate cleanly.
Beyond this limit, all services that keep running will be killed. In most cases, the services have enough time to stop normally,
but some might need more time to perform cleanup tasks.
Before shutting down, the system will send a 'preshutdown' notification.
A service that needs additional time can handle this notification by setting wrapper.ntservice.preshutdown to TRUE.
This will cause the system shutdown to be blocked until the service stops or the preshutdown timeout expires.
The default value is "FALSE".
Blocking the system shutdown may affect the user experience.
This property should be set to TRUE only if the cleanup tasks of the stopping process are absolutely necessary.
This property is only used on Windows platforms. It is ignored on Windows Itanium, Windows XP and lower.
For these versions of Windows, a possible workaround is to edit the "WaitToKillServiceTimeout" registry key,
but this is not really recommended as it would apply to all the services of the system.
If set to TRUE, the service will handle the 'preshutdown' notification sent by the system.
This will block the system shutdown until the service stops or the timeout interval specified by wrapper.ntservice.preshutdown.timeout expires.
This property specifies the amount of time that the Windows Service Manager will wait after sending the preshutdown notification.
When the timeout expires, the system will start its shutdown process and will wait for an additional shutdown timeout
(not configurable from the Wrapper) before it would kill the remaining running services.
Valid values are in the range of "1" to "3600" seconds. The default value is 180 seconds (3 minutes).
Example (the system will wait up to 5 min for the service to stop):
For the cases where the system shutdown timeout is critical, the Wrapper will not impose wrapper.ntservice.preshutdown.timeout to be longer than the timeouts previously listed,
however the default value of 3 min is set much longer than the sum of their default values.