Free .NET developer tool
NCRONTAB Expression Builder & Tester
Build and check the six-field schedules used by Azure Functions TimerTrigger and WebJobs — see what an expression means and exactly when it will run next.
Runs entirely in your browser — nothing you paste is uploaded.
Valid Every 15 minutes, between 08:00 and 18:59, on Monday through Friday.
Next run times
Evaluated in the time zone below, as WEBSITE_TIME_ZONE would be. Azure defaults to UTC.
Run times are calculated in your browser from the current time.
Using the schedule in an Azure Function
Paste the expression into the TimerTrigger attribute. In the isolated worker model the trigger lives in Microsoft.Azure.Functions.Worker.Extensions.Timer:
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.Logging;
public class ScheduledJobs(ILogger<ScheduledJobs> logger)
{
// Every 15 minutes, between 08:00 and 18:59, on Monday through Friday.
[Function("ScheduledCleanup")]
public async Task Run([TimerTrigger("0 */15 8-18 * * MON-FRI")] TimerInfo timer)
{
logger.LogInformation("Run at {Now:O}; next {Next:O}", DateTime.UtcNow, timer.ScheduleStatus?.Next);
if (timer.IsPastDue) logger.LogWarning("Running late — the previous run was missed.");
await Task.CompletedTask;
}
}Keep the schedule in configuration
Wrap an app setting name in percent signs to change the schedule per environment without redeploying. WEBSITE_TIME_ZONE takes a Windows ID on Windows plans and an IANA ID on Linux — the time zone converter maps between them.
// Schedule from configuration instead of a literal: %Name% is resolved from app settings.
[TimerTrigger("%CleanupSchedule%")] TimerInfo timer
// local.settings.json
{
"Values": {
"CleanupSchedule": "0 0 2 * * *",
"WEBSITE_TIME_ZONE": "Eastern Standard Time"
}
}Several scheduled tasks in one WebJob
A continuous WebJob using the WebJobs SDK can host any number of timer functions, each with its own NCRONTAB schedule — no need for one WebJob per task:
// One WebJob, several schedules (Microsoft.Azure.WebJobs.Extensions)
public class Functions
{
public void Hourly([TimerTrigger("0 0 * * * *")] TimerInfo t, ILogger log) => log.LogInformation("hourly");
public void Nightly([TimerTrigger("0 30 1 * * *")] TimerInfo t, ILogger log) => log.LogInformation("nightly");
public void Weekly([TimerTrigger("0 0 6 * * MON", RunOnStartup = false)] TimerInfo t, ILogger log) => log.LogInformation("weekly");
}Field syntax
*every value ·5one value ·1-5a range ·1,15,30a list*/10every 10th value from the start ·5/10every 10th from 5 ·10-50/20stepped range- Months accept
JAN–DEC; days of the week acceptSUN–SATor 0–6 (Sunday is 0, and 7 also means Sunday).
Frequently asked questions
What is the NCRONTAB format used by Azure Functions?
It is cron with an extra seconds field at the front: {second} {minute} {hour} {day} {month} {day-of-week}. So "0 */5 * * * *" runs every five minutes on the minute, and "0 30 9 * * 1-5" runs at 09:30 on weekdays. Azure Functions’ TimerTrigger and WebJobs use the NCrontab library to evaluate it.
What time zone do Azure Functions timer triggers use?
UTC by default. On Windows plans you can set the WEBSITE_TIME_ZONE app setting to a Windows time zone ID such as "Eastern Standard Time"; on Linux Premium and Dedicated plans it takes an IANA ID such as "America/New_York". The Consumption plan on Linux does not support it. With a local time zone, schedules follow daylight saving changes, so a 02:30 run can be skipped or repeated on the change days.
How do day-of-month and day-of-week combine?
In NCrontab both must match. "0 0 9 1 * MON" therefore runs only when the first of the month is a Monday — not on every first and every Monday, as classic Unix cron would. If you want either condition, use two functions or two schedules.
Can I use a TimeSpan instead of a cron expression?
Yes, but only for function apps on an App Service plan: a schedule such as "01:00:00" runs every hour, measured from when the previous run finished rather than on clock boundaries. On Consumption and Premium plans you must use an NCRONTAB expression. Note that "24:00:00" and above are read as days, so use "1.00:00:00" for one day.