Hi Agarwal, Ansh,
Thanks for reaching out Microsoft Q&A portal.
Based on the details you shared. No, Azure Functions do not execute automatically when you change the function app Python version, adding environment variables, clicking restart, enabling back disabled Azure Functions, or deploying code from Azure DevOps.
Azure Functions only run when their specific triggers are activated like a timer (for scheduled runs), an event (such as Blob or Queue changes), or an HTTP request.
Azure Functions HTTP triggers allow you to execute serverless functions in response to HTTP requests.
Trigger Mechanism:
- An HTTP trigger is a type of binding that activates a function when an HTTP request is received.
- The function listens for requests at a specific endpoint (URL) provided by Azure.
HTTP methods like GET, POST, PUT, etc., can be specified for the trigger.
Reference documentation: Azure Functions HTTP trigger | Microsoft Learn
A Timer Trigger is executed based on a schedule defined using a CRON expression or interval setting.
Azure Functions Timer Trigger allows you to execute code on a predefined schedule, CRON expression or interval setting.
Trigger Mechanism:
- Timer triggers use CRON expressions to define the schedule. For example:
- 0 */5 * * * * runs the function every 5 minutes.
- 0 30 9 * * * runs the function daily at 9:30 AM.
- The Azure Functions runtime monitors the schedule and invokes the function at the specified times.
The trigger uses the host machine’s time zone (usually UTC) unless configured otherwise.
No user interaction or HTTP call is needed it fires based on the system clock and the schedule definition.
Reference documentation: Timer trigger for Azure Functions | Microsoft Learn
An Event Trigger runs a function when an event is published to an event source like Azure Event Grid, Azure Event Hubs, or Azure Storage events. These are push-based triggers the event source pushes the event to the function without polling.
So, you can rest assured these administrative actions by themselves will not trigger your functions.
Please feel free to reach out for further questions. I am Happy to assist you!