A component whose methods run when the server starts, before any application loads. Use it for server-wide setup that does not belong to a single application, such as setting server scope variables, configuring logging or scheduling tasks. It is separate from Application.cfc.
In ColdFusion, Server.cfc is disabled by default. Enable it in the ColdFusion Administrator under Server Settings > Settings, where you can also change its location (the default is Server.cfc in the web root) and set a timeout. The code cannot use the application or request scopes, or features that need the server to be fully started, such as a cfhttp request to the same server. Startup errors are logged in server.log, with details in exception.log.
component { function onServerStart() { } }
reload argument, which is false on the first start and true when the server configuration is updated in the Lucee Administrator or an extension is installed.
LUCEE_BUILD or LUCEE_ENABLE_WARMUP to true.
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.