Skip to main content

Startup and Shutdown Behavior (Tools/APIs)

Customize startup and shutdown behavior.

Available Tools

Startup and shutdown behavior is a broad topic. The following list indicates tools you can use to programmatically customize startup and shutdown behavior of the system as a whole:

Enables you to modify and access information about the [Startup] section of the CPF. (Note that you usually modify this file via the Management Portal. See Memory and Startup Settings.)

The class documentation includes examples and details.

Availability: %SYS namespace.

^ZWELCOME routine

InterSystems reserves this routine name for your use; the routine is not predefined. The ^ZWELCOME routine is intended to contain custom code to execute when the Terminal starts. See Using the ObjectScript Shell.

Availability: Affects only the namespace in which it is defined (by default).

^%ZSTART routine

InterSystems reserves this routine name for your use; the routine is not predefined. The ^%ZSTART routine is intended to contain custom code to execute when certain events happen, such as when a user logs in. If you define this routine, the system calls it when these events happen. See Customizing Start and Stop Behavior with ^%ZSTART and ^%ZSTOP Routines.

Availability: Affects all namespaces.

^%ZSTOP routine

InterSystems reserves this routine name for your use; the routine is not predefined. The ^%ZSTOP routine is intended to contain custom code to execute when certain events happen. See the comments for ^%ZSTART.

Availability: Affects all namespaces.

In addition, many classes that you use provide callback methods that enable you to customize startup and shutdown behavior of the code. For example, you can customize callback methods to control startup and shutdown behavior of productions.

FeedbackOpens in a new tab