Published October 21, 2026
How to Monitor Azure Functions Timer Triggers
An Azure Functions timer trigger runs a function on a schedule. Application Insights and the Monitor tab show invocations that were collected. A disabled function, a host that never starts, or a trigger the runtime ignores leaves nothing to collect. A ping after the work is the alert for that silence.
The timer facts below are from the Azure Functions docs. A Linux crontab on a machine you run is crontab not running. The same silence on EventBridge is monitor AWS EventBridge scheduled Lambda. Cloud Scheduler's five fields are monitor Cloud Scheduler and Cloud Run. The general pattern is how to monitor cron jobs.
Six fields, seconds first
Azure Functions uses the NCronTab library. A six-field NCRONTAB expression adds seconds at the front:
{second} {minute} {hour} {day} {month} {day-of-week}
0 */5 * * * * is once every five minutes, at second 0 of every fifth minute. 0 0 * * * * is the top of every hour. 0 30 9 * * * is 9:30 AM every day. 0 30 9 * * 1-5 is 9:30 AM every weekday. Day numbers are 0 through 6, and 0 starts with Sunday. Names such as Mon and Jan are accepted and are case-insensitive. 0 30 9 * Jan Mon is 9:30 AM every Monday in January.
NCRONTAB also accepts five fields. The sixth field, when present, is seconds at the beginning. Five fields are minute granularity. */5 * * * * is every five minutes. */5 * * * * * is a different expression: the first field is seconds, so it fires every five seconds. Pasting a Linux five-field line into Azure is the five-field form. A leading * makes the expression fire every second of the matching minutes, while a leading 0 keeps the same minutes at second 0.
An invalid expression makes Function Test in the portal return a 404. If Application Insights is connected, more detail is logged there.
Drop a leading seconds field of 0 and save the other five fields: minute, hour, day of month, month, day of week.
| NCRONTAB | CronNudge check |
|---|---|
0 */5 * * * * |
*/5 * * * * |
0 0 * * * * |
0 * * * * |
0 0 */2 * * * |
0 */2 * * * |
0 30 9 * * * |
30 9 * * * |
0 30 9 * * 1-5 |
30 9 * * 1-5 |
0 0 10 * * * |
0 10 * * * |
Sunday is 0 on that day field. CronNudge's parser treats Sunday as 0 or 7, so 1-5 is Monday through Friday on both sides. Keep the check numeric. The cron expression examples and the cron tool use the same five fields. A seconds-level expression is not a check period. Free's shortest interval is 5 minutes. Pro's is 1 minute.
UTC, unless you set a zone
The numbers are a clock time, not a duration. A 5 in the hour field is 5:00 AM, not every five hours. The default zone for the expression is UTC.
WEBSITE_TIME_ZONE moves that clock. On Windows, every plan takes the Windows time zone id from tzutil.exe /L, such as Eastern Standard Time. On Linux, Premium and Dedicated take a tz database name, such as America/New_York. With the setting in place, 10:00 AM Eastern is 0 0 10 * * *, and the clock follows daylight saving time and standard-time changes.
WEBSITE_TIME_ZONE and TZ are not supported on Linux in the Flex Consumption plan or the Consumption plan. Setting either one can cause SSL problems and stop metrics for the app. On those plans the expression stays UTC.
The check's timezone is an IANA name such as America/New_York. When the Windows app setting is Eastern Standard Time, put America/New_York on the check. When the function app is left on the default UTC clock, put UTC on the check.
TimeSpan is an interval, on an App Service plan
The timer reference allows a TimeSpan schedule only for a function app on an App Service plan. It is the gap between invocations, not a wall-clock time. When the function runs longer than that gap, the timer invokes it again as soon as it completes. The string is hh:mm:ss when the hour is under 24. When the first two digits are 24 or greater, the form is dd:hh:mm. "01:00:00" is every hour. "00:01:00" is every minute. "1.00:00:00" is every day.
The Consumption and Flex Consumption scale controller only interprets CRON. On Consumption for Linux, a TimeSpan can still start and fire, and the scale controller cannot read the schedule, which can scale unexpectedly. On Consumption for Windows, and on Flex Consumption, a non-CRON schedule is blocked and the app fails at startup. Replace "00:05:00" with 0 */5 * * * * or */5 * * * *.
One instance, no retry, and startup runs
When the app scales out, only one instance of a timer-triggered function runs. It does not trigger again while an invocation is still outstanding. The trigger uses a storage lock on the host storage connection AzureWebJobsStorage so that one timer instance runs across those instances. If two function apps share a storage account and the same identifying configuration, and each uses a timer trigger, only one timer runs. On runtime 2.x and later that id is the AzureFunctionsWebHost__hostid environment variable, for function apps that are not deployed to App Service.
runOnStartup set to true invokes the function when the runtime starts: the app wakes after going idle, it restarts because functions changed, or it scales out. The docs say to use it with caution, and rarely if ever in production. Those extra executions happen at unpredictable times. On the Consumption plan the trigger runs whenever the app scales, which can raise the bill. Leave it false. The Python v2 decorator is run_on_startup=False. Java's @TimerTrigger does not support runOnStartup or useMonitor=true.
useMonitor persists schedule occurrences so the schedule is kept when instances restart. If you omit it, the default is true when the recurrence is at least one minute, and false when the schedule fires more than once a minute. The isPastDue property is true when this invocation is later than scheduled. A restart can miss an invocation. The Python v2 property is past_due. The in-process C# property is IsPastDue. A late run that still finishes can send the success ping. If grace has already expired, that success is the recovery.
Unlike a queue trigger, a timer does not retry after the function fails. The next call is the next time on the schedule. You can invoke the timer yourself, for a test or a warmup, through the webhook described for non-HTTP triggers.
How long the host lets it run
functionTimeout in host.json is the limit for every function execution, as a timespan [d.]hh:mm:ss. -1 means unbounded. A fixed upper bound is the recommendation. A 24-hour limit is 1.00:00:00, not 24:00:00. After the trigger starts the function, it has to return within that duration. Past it, the language worker restarts. For C# in-process, the host process restarts.
| Plan | Default | Maximum |
|---|---|---|
| Consumption | 5 minutes | 10 minutes |
| Flex Consumption | 30 minutes | Unbounded |
| Premium | 30 minutes | Unbounded |
| Dedicated | 30 minutes | Unbounded, with Always On |
Flex Consumption and Premium do not enforce a maximum execution timeout. During scale-in the platform gives the execution 60 minutes, and during a platform update it gives 10 minutes. Dedicated's unbounded timeout requires Always On. Those platform windows are not the check's grace.
Logs show the invocations that happened
Application Insights collects logs, performance, and errors when the app has APPLICATIONINSIGHTS_CONNECTION_STRING (the current setting) or APPINSIGHTS_INSTRUMENTATIONKEY (the legacy key). With that integration, the function's Monitor tab lists invocations. Pick a function that has run at least once, open Monitor, and refresh. The list can take up to five minutes because the client batches telemetry. Live Metrics Stream does not wait on that batch. Sampling in host.json can omit an execution from the Monitor blade.
The Monitor tab cannot list an invocation the host never started.
Disabling a function makes the runtime ignore the event that would trigger it. The app setting is AzureWebJobs.<FunctionName>.Disabled set to true. The portal Enable and Disable buttons write that setting. Changing an app setting restarts the function app by default. It is common to disable timer functions in a deployment slot so the slot and production do not both run. A disabled function can still be called with the master key, including Test/Run in the portal. A timer the runtime is ignoring does not write an invocation.
If the Functions runtime cannot start, the app does not run. The usual cause is that the app lost its storage account. A deleted host storage account means the function app will not run. A daily execution quota you configured can stop the app until the next 24-hour window, and execution stays blocked until you raise the quota and restart, or until the next day. In runtime 4.x a host id collision logs an error and the host is stopped.
A function that did fail is in the logs, and it is not called again until the next schedule time. The missing success ping is the alert.
Ping after the work succeeds
The success URL is https://cronnudge.com/ping/YOUR_ID. GET, POST, and HEAD all count. A stored ping answers ok with Cache-Control: no-store. YOUR_ID is the ping id, not the badge id. Keep CRONNUDGE_URL free of a query string and of /start or /fail. CronNudge does not call the Azure API, cannot read Application Insights, and cannot start or retry a function. It only knows about pings it receives.
Node.js model v4 registers the timer with app.timer. Ping after doTheWork returns. fetch rejects when the connection fails. An HTTP error status does not throw. If the ping is not stored, the check alerts after grace. A failure calls /fail and then rethrows, so the invocation is a failure and the timer waits for the next schedule.
const { app } = require('@azure/functions');
async function ping(path) {
const url = process.env.CRONNUDGE_URL;
if (!url) return;
try {
await fetch(url + path, { method: 'POST' });
} catch {
// A missed ping alerts after grace.
}
}
app.timer('cleanupTimer', {
schedule: '0 */5 * * * *',
runOnStartup: false,
handler: async () => {
try {
await doTheWork();
} catch (error) {
await ping('/fail');
throw error;
}
await ping('');
},
});
/fail marks the check down immediately when it was not already down. A paused check stores the ping and does not alert. A second failure while the check is already down does not send another alert. One alert when it goes down, and one when a later success recovers it.
Pass the exit code
?exit= accepts an integer from 0 to 255. 0 is a success. 1 through 255 is a failure, the same immediate down alert as /fail when the check was not already down. Anything else is ignored, and the ping stays a success. Python v2 is the documented decorator. urlopen sends GET. OSError covers a timeout, a refused connection, and an HTTP error.
import logging
import os
import urllib.request
import azure.functions as func
app = func.FunctionApp()
def ping(suffix):
url = os.environ.get("CRONNUDGE_URL")
if not url:
return
try:
urllib.request.urlopen(url + suffix, timeout=10).read()
except OSError:
return
@app.function_name(name="mytimer")
@app.timer_trigger(schedule="0 */5 * * * *", arg_name="mytimer", run_on_startup=False)
def test_function(mytimer: func.TimerRequest) -> None:
if mytimer.past_due:
logging.info("The timer is past due!")
code = 0
try:
do_the_work()
except Exception:
code = 1
ping(f"?exit={code}")
if code != 0:
raise RuntimeError("timer work failed")
Swallowing the exception without a non-zero ?exit= or /fail makes Azure record a successful invocation and leaves the check waiting until grace. Rethrow after the failure ping.
The isolated worker uses the same schedule string. The timer sample is a TimerTrigger("0 */5 * * * *") parameter of type TimerInfo, and the worker model runs async Task functions, so the same GET can be awaited after the work:
[Function("TimerFunction")]
public async Task Run([TimerTrigger("0 */5 * * * *")] TimerInfo timer)
{
await DoTheWork();
var url = Environment.GetEnvironmentVariable("CRONNUDGE_URL");
if (string.IsNullOrEmpty(url)) return;
try
{
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(10) };
await client.GetAsync(url);
}
catch (Exception)
{
// The work succeeded. A missing ping alerts after grace.
}
}
/start and a max runtime
/start records a start. It is not a success. Turn on "Track start and finish," or set Max runtime, which turns run tracking on. A second /start while a run is open is an overlap alert and does not close the first run. A success or /fail closes the open runs. Two success pings alone do not raise an overlap alert.
Max runtime is 1 second through 7 days. With a run open, the deadline becomes that start plus the max runtime. The schedule's grace is not the earlier of the two. No finish means one stuck alert, once for that start, and the check goes down. A later success is the recovery. With run tracking and no max runtime, an open run is due after grace, at least 60 seconds, and the alert is down. A timer that never starts never calls /start, so it cannot go stuck. Silence until the schedule deadline is the alert for an invocation that never began. Free includes run tracking on 3 checks. Pro removes that cap. Details are in assertions, runs, and agents.
app.timer('cleanupTimer', {
schedule: '0 30 9 * * *',
runOnStartup: false,
handler: async () => {
const url = process.env.CRONNUDGE_URL;
if (url) {
try {
await fetch(url + '/start', { method: 'POST' });
} catch {
// A missed start is not a success. The finish ping is still the deadline.
}
}
try {
await doTheWork();
} catch (error) {
if (url) {
try {
await fetch(url + '/fail', { method: 'POST' });
} catch {
// Grace, or max runtime, covers a missed /fail.
}
}
throw error;
}
if (!url) return;
try {
await fetch(url, { method: 'POST' });
} catch {
// The work succeeded. The open run stays open until max runtime or grace.
}
},
});
Set max runtime a little past the longest healthy run, and shorter than functionTimeout when you want the stuck alert before the host restarts the worker. If the timeout wins first, the finish request never runs, and the open run alerts when max runtime elapses. An Idempotency-Key makes a retried request a replay. The key is cut at 128 characters and matched per check, so the finish ping needs its own key. Hangs are in cron job stuck or hanging.
Match the check to the expression
Use the five fields from the table, and the zone the function app actually evaluates. The timer reference does not publish a lateness allowance. The graces below are a few minutes on the short jobs and an hour on the daily job. Read real invocations on the Monitor tab, then change grace. The cron tool lists the check's next runs before grace is added.
The form's periods are 5 minutes, 15 minutes, 30 minutes, 1 hour, 6 hours, 1 day, and 1 week. Grace is none, 1 minute, 5 minutes (the default), 15 minutes, or 1 hour. Anything else, from the plan minimum up to 31 days for an interval and from 0 through 7 days for grace, is an API value. The API is on Pro. Saving a check starts that clock from the moment you save it. Invoke the function once so the first stored ping is a real run. A success then moves the deadline. An interval counts from the last success. A cron expression uses the next occurrence after that success, then adds grace.
Every five minutes. */5 * * * *, timezone UTC, grace 5 minutes. A success at 12:00 is next due at 12:10. A missing run alerts at 12:10. This gap is Free's minimum.
Hourly. 0 * * * *, timezone UTC, grace 15 minutes. A skipped hour alerts 15 minutes after the next top of the hour. A 1-hour interval plus 15 minutes of grace is due 75 minutes after the last success and does not need a zone.
Daily at 10:00 Eastern. When WEBSITE_TIME_ZONE is America/New_York or Eastern Standard Time, use 0 10 * * *, timezone America/New_York, grace 1 hour. A missing run alerts at 11:00 in that zone. On Linux Consumption or Flex Consumption, leave the expression in UTC and set the check to UTC. A non-zero ?exit= marks the check down at the time of the ping. A later success, while the check is down, is the recovery.
Every minute. * * * * * is a valid expression and is not a Free check. Pro's minimum is 1 minute. A schedule that fires more than once a minute is not a check period.
Free is 10 checks, a 5-minute minimum interval, email plus one Slack or Discord channel, and run tracking on 3 checks. Pro is $12 a month for 100 checks, a 1-minute minimum, signed webhooks, and the API. Details are on pricing.
FAQ
Does an Azure Functions timer tell me when it never runs? No. The host runs the function on the schedule. Application Insights and the Monitor tab show invocations that were collected. A disabled function, a host that cannot start, and a trigger the runtime ignores leave no invocation. A ping after the work is the alert for that silence.
How do five-field and six-field NCRONTAB expressions differ?
Five fields are minute granularity. Six fields put seconds first. */5 * * * * is every five minutes. */5 * * * * * is every five seconds. 0 */5 * * * * is every five minutes at second 0. Drop a leading 0 to get the five fields the check stores.
Which timezone does the NCRONTAB expression use? UTC, unless you set WEBSITE_TIME_ZONE. Windows uses a Windows time zone id on every plan. Linux Premium and Dedicated use a tz database name. Linux Flex Consumption and Consumption do not support WEBSITE_TIME_ZONE or TZ. The check takes an IANA name, so Eastern Time on the check is America/New_York.
Does a failed timer function retry? No. A timer does not retry after the function fails. The next call is the next time on the schedule. /fail or ?exit= from 1 to 255 marks the check down immediately when it was not already down. exit=0 is a success. A value outside 0 to 255 is ignored.
What if the function runs past functionTimeout? The worker restarts, and an in-process C# host restarts. Consumption defaults to 5 minutes and caps at 10. Flex Consumption, Premium, and Dedicated default to 30 minutes, and their maximum is unbounded. Dedicated requires Always On for that unbounded timeout. Ping /start and set a max runtime, from 1 second through 7 days, to alert when the finish never arrives. A function that never starts never calls /start.
Can CronNudge read Application Insights or start the function? No. It does not call the Azure API, read Application Insights, or start or retry functions. It only knows about pings it receives. The Monitor tab and Application Insights are where the invocations that did run are listed.
The schedule is the host's clock. The log is the invocation you go looking for. The ping is how you hear about the run that never called home. Create the check, or read the five fields on the cron tool. Related: how to monitor cron jobs, crontab not running, cron expression examples, EventBridge scheduled Lambda, and Cloud Scheduler and Cloud Run.