Branch | Status |
---|---|
master |
This repo contains the startup binding extension for the Azure WebJobs SDK. This repo is available as the Devlight.Azure.Functions.Extensions.Startup nuget package.
A simple startup trigger for running code when the runtime starts. You might need it if you have some heavier initialization to run on startup. The runtime starts when the function app wakes up after going idle due to inactivity, when the function app restarts due to function changes, and when the function app scales out.
Here is how to use it:
public static void StartupJob([StartupTrigger] StartupInfo startup)
{
Console.WriteLine("The function app has just started, woke up or scaled out!");
}
StartupTrigger uses the Singleton feature of the WebJobs SDK to ensure that only a single instance of the triggered function runs.