Spec-Zone.ru › ColdFusion

onApplicationEnd

Defined in Application.cfc, invoked when the application times out or when the server is shutting down.

function onApplicationEnd(applicationScope) { } → returns boolean

  • CF7+
  • BL 1.0.0+
  • See Also: application-cfc onapplicationstart

    Argument Reference

    ApplicationScope struct
    Required

    The application scope of the application that is ending.

    Examples
    Sample code invoking the onApplicationEnd function

    Write to log when onApplicationEnd is triggered

    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

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API