AzureFunctionsCloud8 min read

Azure Functions Timer Trigger: NCRONTAB Guide

Azure Functions uses a timer trigger to run code on a schedule. Unlike standard 5-field cron, Azure uses NCRONTAB— a 6-field format with a seconds field prepended. Here's the complete guide.

NCRONTAB: 6 Fields (Seconds First)

Standard Linux cron (5 fields)

MIN HOUR DOM MONTH DOW0 9 * * 1-5

Azure NCRONTAB (6 fields)

SEC MIN HOUR DOM MONTH DOW0 0 9 * * 1-5

The 1st field is Seconds (0–59). Always set it to 0 unless you need sub-minute precision.

NCRONTAB Field Reference

SEC MIN HOUR DOM MON DOW

Second

0–59

Minute

0–59

Hour

0–23

Day

1–31

Month

1–12

Weekday

0–6 (Sun=0)

Timer Trigger Examples

C# Isolated Worker

[Function("DailyReport")]
public async Task Run(
    [TimerTrigger("0 0 9 * * 1-5")] TimerInfo timer,
    FunctionContext context)
{
    var logger = context.GetLogger<DailyReportFunction>();
    logger.LogInformation("Running daily report at {time}", DateTime.UtcNow);
    // ... your logic
}

Python v2 Model

import azure.functions as func
import logging

app = func.FunctionApp()

@app.timer_trigger(schedule="0 */5 * * * *",
                   arg_name="myTimer",
                   run_on_startup=False)
def timer_trigger_func(myTimer: func.TimerRequest) -> None:
    logging.info("Timer trigger fired")

function.json (in-process model)

{
  "bindings": [
    {
      "name": "myTimer",
      "type": "timerTrigger",
      "direction": "in",
      "schedule": "0 0 9 * * 1-5",
      "runOnStartup": false,
      "useMonitor": true
    }
  ]
}

Common Patterns

ScheduleNCRONTAB
Every day at midnight0 0 0 * * *
Every 5 minutes0 */5 * * * *
Every weekday at 9 AM0 0 9 * * 1-5
First of month at 2 AM0 0 2 1 * *
Every hour on the hour0 0 * * * *
Every 30 seconds0,30 * * * * *
Every Sunday at 6 AM0 0 6 * * 0
Every 15 min, 9 AM–5 PM0 */15 9-17 * * 1-5

Timezone Configuration

By default, Azure Functions timer triggers run in UTC. To use a local timezone, set an application setting:

Windows App Service Plan

App setting name:

WEBSITE_TIME_ZONE

Value: Windows TZ name

Eastern Standard Time

Linux / Consumption Plan

App setting name:

WEBSITE_TIME_ZONE

Value: IANA timezone

America/New_York
Warning: Windows and Linux use different timezone name formats. Linux Consumption plans require IANA names (America/New_York) while Windows App Service Plans use Windows TZ names (Eastern Standard Time). Check your plan type first.

Common Gotchas

5-field cron also works for daily/hourly

Azure also accepts standard 5-field cron for some scenarios, but for timer triggers always use 6-field NCRONTAB. The schedule "0 9 * * 1-5" is 5-field — Azure will interpret it as SEC MIN HOUR DOM MONTH, not what you expect.

💡

runOnStartup vs scheduled execution

Set "runOnStartup": false in production. If true, the function fires every time the host restarts — which can be frequent on Consumption plans.

🔒

useMonitor for singleton execution

Enable useMonitor: true to prevent multiple instances from running the same timer job simultaneously. Requires Azure Storage for distributed locking.

🧊

Consumption plan cold starts

On Consumption plans, functions may miss a schedule if no request comes in to warm up the host. Use Premium plan or Dedicated plan for mission-critical schedules.

Convert Linux cron to Azure NCRONTAB

Our Platform Converter translates 5-field Linux cron to 6-field Azure NCRONTAB (prepends the seconds field) automatically.