Monitor Azure Functions timer triggers — detect missed and failed scheduled runs
Azure Functions timer triggers fire on a 6-field NCRONTAB schedule. When a function throws or the host is down, Application Insights logs the exception — but sends no notification unless you've configured alerts, which is non-trivial to set up. A missed run (host offline during the scheduled window) produces nothing at all. One ping call at the end of a successful function execution is the simplest reliable detection.
Setup: one HTTP call, about a minute
Snippets for Python v2, C# isolated worker, and Node.js.
Create a heartbeat monitor in LastPing
In the console, create a monitor.
Azure Functions timer uses 6-field NCRONTAB (prepend a seconds field to standard cron).
Use the same expression as your function's schedule binding. All times in
the NCRONTAB are UTC.
Python v2 function — ping on success
Store the monitor ID in an app setting (LASTPING_MONITOR_ID) and call the ping at the end of the successful path.
C# isolated worker — ping on success
Node.js v4 function — ping on success
Add the app setting in Azure
In the Azure portal: Function App → Configuration → Application settings → + New application setting. Or via Azure CLI:
What this catches
- Unhandled exception —
/failfires; incident opens immediately. - Function host offline during scheduled window — no invocation, no ping → incident opens on silence.
- Function timeout (default 5 min, up to 60 min) —
/startarrived, function killed before success → overrun incident. - Deployment broke the function — host restarts and misses the trigger window → silence → incident.
- Recovery — next successful run closes the incident automatically.
Running on AWS? See AWS Lambda + EventBridge. On GCP? See Google Cloud Scheduler. For the broader concept, see dead-man's switch explained. For AI agent heartbeat monitoring, see the LastPing MCP server.
Questions people ask
Front-loaded answers — the most important fact first.
-
What cron format does Azure Functions use?
Azure Functions uses 6-field NCRONTAB where the first field is seconds:
{second} {minute} {hour} {day} {month} {day-of-week}. Example:0 0 3 * * *= 03:00:00 UTC daily. All times are UTC; there is no per-binding timezone setting (set the function app's WEBSITE_TIME_ZONE app setting to change the host timezone). -
Does Azure Functions alert on a missed timer trigger?
No. A missed trigger (host offline during the scheduled window) produces nothing by default. If
use_monitor=True(Python) orUseMonitor=true(C#) is set, missed invocations are caught up on next host start — but no notification is sent. Dead-man's-switch monitoring catches the gap. -
What is the difference between RunOnStartup and UseMonitor?
RunOnStartup=Truefires the function immediately when the host starts, regardless of schedule — useful in development, dangerous in production (causes extra invocations on every deployment).UseMonitor=Trueenables Azure's built-in missed-run catch-up: if the host was offline when the schedule fired, it fires on next startup. UseRunOnStartup=False, UseMonitor=Truein production. -
Is this free?
Yes. LastPing is free and fully hosted with no monitor cap and no paid tier. See vs Healthchecks.io and vs Cronitor.
Azure timer triggers fail silently. Add one line to know immediately.
One HTTP call at the end of your function. First alert in under a minute — and LastPing monitors itself the same way.