CronTool
Cron expression editor & debugger

NCRONTAB — last day of the month (Azure Functions)

NCRONTAB — the cron implementation used by Azure Functions, Hangfire and several other .NET schedulers — does not support the L modifier. To run a function on the last day of every month, schedule daily and check the date in your code, or register three separate triggers covering each month length.
NCRONTAB cron is 6 fields: seconds minute hour day-of-month month day-of-week. No year field, no L, no W, no ?. It's strict standard cron with seconds added at the front.

Examples

  • 018***
    Every day at 18:00
  • 0*/5***
    Every 5 hours
  • 018**1-5
    Weekdays at 18:00
  • 001**
    Once a month

Cheatsheet

FieldRequiredValues RangeWildcardsminuteYes0-59, - * / hourYes0-59, - * / day of monthYes1-31, - * / L W monthYes1-12, - * /day of weekYes0-7, - * / L

Calendar

View future cron matches in a calendar

April 2026

Showing next 1000 cron schedules

Loading...

Azure Function — daily trigger + runtime check

using System;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;

public class MonthEndFunction
{
    [FunctionName("MonthEnd")]
    public void Run(
        [TimerTrigger("0 0 0 * * *")] TimerInfo myTimer,
        ILogger log)
    {
        var today = DateTime.UtcNow.Date;
        if (today.AddDays(1).Day != 1)
        {
            log.LogInformation("Not the last day of {Month} — skipping.", today.ToString("MMMM"));
            return;
        }

        log.LogInformation("Running month-end work for {Date}", today);
        // ... your last-day-of-month work here
    }
}

Multi-trigger approach

If you prefer to encode the “last day” logic in the schedule itself, register three timer triggers (one per month-length group):

[FunctionName("MonthEnd30")]
public void Run30([TimerTrigger("0 0 0 30 4,6,9,11 *")] TimerInfo t, ILogger log) => RunMonthEnd(log);

[FunctionName("MonthEnd31")]
public void Run31([TimerTrigger("0 0 0 31 1,3,5,7,8,10,12 *")] TimerInfo t, ILogger log) => RunMonthEnd(log);

[FunctionName("MonthEnd28")]
public void Run28([TimerTrigger("0 0 0 28 2 *")] TimerInfo t, ILogger log) {
    if (DateTime.UtcNow.AddDays(1).Day == 1) RunMonthEnd(log);
}

[FunctionName("MonthEnd29")]
public void Run29([TimerTrigger("0 0 0 29 2 *")] TimerInfo t, ILogger log) {
    if (DateTime.UtcNow.AddDays(1).Day == 1) RunMonthEnd(log);
}

Three or four functions for one logical job is a lot of boilerplate. The daily-with-runtime-check approach is usually cleaner.

NCRONTAB syntax cheat-sheet

  • 6 fields — seconds, minute, hour, day-of-month, month, day-of-week.
  • Always UTC in the consumption plan; the premium plan supports the WEBSITE_TIME_ZONE setting.
  • No `L`, `W`, `?`, `#` — last-day, weekday, no-specific-value and Nth-weekday modifiers are unsupported.
  • Step / list / range — supported in every field.
  • AliasesJAN-DEC, SUN-SAT accepted.

NCRONTAB pitfalls

  • Cold starts — Azure Functions on the consumption plan can take a few seconds to start. For a last-day-of-month job that needs to fire at exactly 00:00, use a Premium plan or the dedicated tier.
  • Concurrent runs — by default, the timer trigger doesn't prevent overlap if the previous run is still going. Use a singleton lock if your work is not safe to run twice.
  • Local development — `func host start` respects the cron schedule in real time. To test the runtime check, fake DateTime.UtcNow via a clock abstraction.

Frequently asked questions

Does NCRONTAB support the L modifier?

NCRONTAB (the cron expression library used by Azure Functions and Hangfire) supports a 6-field syntax with seconds, but does NOT natively support the `L` modifier for last-day-of-month. The standard workaround is to schedule daily and check the date in your function, or use the multi-cron approach with three separate triggers.

What's the difference between NCRONTAB and AWS / Quartz cron?

NCRONTAB is 6 fields (seconds, minute, hour, day-of-month, month, day-of-week) with the seconds field at the front. AWS EventBridge is also 6 fields but with year at the END (no seconds). Quartz is 6 or 7 fields with seconds at the front and optional year at the end. NCRONTAB does not support `L`, `W`, `?` or `#`.

How do I configure NCRONTAB for an Azure Function?

In `function.json` or via the `[TimerTrigger("...")]` attribute. Example: `[TimerTrigger("0 0 0 * * *")]` runs daily at midnight UTC. For last-day-of-month, schedule daily and check `DateTime.UtcNow.AddDays(1).Day == 1` inside the function.

Why is the daily-with-runtime-check pattern recommended?

It keeps the cron string standard and the date logic in C# / TypeScript where it's easy to test, easy to log, and reads naturally. The multi-cron approach (three triggers) requires three Function entry points or routing inside one — more moving parts for the same outcome.

How can I validate an NCRONTAB expression?

Paste it into CronTool — toggle extended-cron mode to enable the seconds field, and the parser validates the 6-field NCRONTAB shape. NCRONTAB doesn't accept `L`/`W`/`?`/`#`, so any expression you validate visually here in standard cron mode will work in Azure Functions.

Ready to schedule it?

Point Crontap at any URL. Pick any cron. Done.

WordPress, Shopify, Railway, Cloud Run, Vercel, HubSpot, Ghost, your own box. If it answers HTTP, Crontap can drive it on a clock you can read, in the timezone that actually matters, and page you when something breaks.

Free forever tier ・ No credit card required

Your next schedule
GET/wp-cron.php?doing_wp_cron=1

Schedule

every 5 minutes

Next run

in 23s

Apihustle Logo

This tool is part of the Apihustle suite - a collection of tools to test, improve and get to know your API inside and out.

  • Clobbr logo

    Clobbr

    The app & CLI tool to test API endpoint speed.

    Visit
  • Crontap logo

    Crontap

    Schedule recurring API calls using cron syntax.

    Visit
  • CronTool logo

    CronTool

    Debug multiple cron expressions on a calendar.

    Visit

  • Page AI

    AI Website Generator that designs and writes clean code.

    Visit
  • Shipixen

    Generate customized boilerplates in minutes.

    Visit
  • Page UI

    Landing page UI components for React & Next.js

    Visit