An Azure service that provides an event-driven serverless compute platform.
Hi @TAH ,
Welcome to Microsoft Q&A portal. Thank you for posting your question here.
This is a common behavior when working with Azure Functions running in a Linux Container with Python. Below is an explanation of why you are experiencing this and the official, reliable methods to check your timer schedule status (last/next run) and view your application logs.
1. How to View Timer Trigger Scheduled Status (Last Run & Next Run)
In Azure Functions, the general Overview blade of the Function App does not natively display a live countdown or "Next Run" schedule widget for containerized functions. However, the Functions runtime natively persists this schedule state in Azure Storage. Check the Function's Monitor Blade (Last Run & History)
- In your Function App, go to Functions --> select your specific Timer Trigger function --> click Monitor.
- Under the Invocations tab, you will see the historical log of Last Run execution timestamps, success/failed status, and execution duration.
2. Why "Code + Test" Logs are Blank (Even When "Connected")
When running a Python Function App inside a Custom Container, seeing a blank console in the Code + Test blade is expected due to the following reasons:
- Container I/O Routing: The lightweight log streamer used in the Code + Test blade is primarily designed for standard in-process hosting. For Linux container deployments, standard console output (
stdout/stderr) emitted from inside the isolated Docker container is often not routed to this ephemeral portal UI session. - Asynchronous Timer Intervals: Live log streaming only displays events that occur while your browser is actively connected to the stream. Because timer triggers execute on a schedule (e.g., once an hour or once a day), the console will remain completely blank unless the timer happens to trigger during the exact window you are watching the screen.
- Python Logging Setup: Ensure your
app.pyis utilizing the standard Pythonloggingmodule (e.g.,logging.info("Timer triggered")) rather than standardprint()statements, asprint()calls are not guaranteed to flush to Azure telemetry buffers without unbuffered I/O enabled.
3. Reliable Ways to View Python Container Logs & Timer Status
Option 1: Application Insights (Recommended Official Approach)
For container-based deployments, Application Insights is the most robust way to view historical logs, traces, and upcoming schedule evaluations.
- In your Function App, go to Monitoring --> Logs (Log Analytics).
- Run the following KQL queries to check execution history and schedule announcements:
// View historical timer executions and status
requests
| where name contains "<YourTimerFunctionName>"
| order by timestamp desc
// View your app.py logging.info() outputs and host schedule announcements
traces
| where message contains "<YourTimerFunctionName>" or message contains "Next schedule for function"
| order by timestamp desc
Option 2: App Service / Container Log Stream
- Navigate to your Function App --> under Monitoring, click Log stream (or check Deployment Center -->Logs).
- This stream captures platform-level Docker container logs and Functions host startup events. You can observe the container initialization sequence here to confirm whether your Python timer trigger was indexed and scheduled successfully upon startup.
References: