onApplicationEnd
Defined in Application.cfc, invoked when the application times out or when the server is shutting down.
function onApplicationEnd(applicationScope) { } → returns boolean
Argument Reference
ApplicationScope struct Required
The application scope of the application that is ending.
Examples Sample code invoking the onApplicationEnd function
Write to the log that application has ended. In the example below, text 'myApp ended on {current date/time}' gets added to D:\CF\logs\myApp.log file. Note: Application has already ended, but we can use ApplicationScope argument to access any Application scope variables.
public void function onApplicationEnd(struct ApplicationScope){
writeLog(text = "#arguments.ApplicationScope.name# ended on: #now()#");
return true;
}
© 2012–present Foundeo, Inc. and the CFDocs contributors.
Licensed under the MIT License.
ColdFusion is a trademark of Adobe Systems Incorporated.
https://cfdocs.org/onapplicationend