Cron Expressions for Azure Functions Timer Trigger
Azure Functions Timer Trigger uses a 6-field NCRONTAB expression where the first field is seconds (not minutes). This differs from standard crontab, GitHub Actions, and Kubernetes CronJob, all of which start with minutes.
Common Azure Cron Patterns
0 */5 * * * *Runs every 5 minutes (note: second field is first)
0 0 * * * *Runs at the top of every hour (second=0, minute=0)
0 0 9 * * *Runs every day at 09:00:00
0 0 8 * * 1-5Runs Monday through Friday at 08:00:00
*/30 * * * * *Runs every 30 seconds — unique to Azure (sub-minute!)
0 0 2 * * *Runs every night at 02:00:00
0 0 0 1 * *Runs at midnight on the 1st of every month
0 0 12 * * 1Runs every Monday at 12:00:00 UTC
Azure Functions Timer Trigger — function.json
// function.json (in-process model)
{
"disabled": false,
"bindings": [
{
"name": "myTimer",
"type": "timerTrigger",
"direction": "in",
"schedule": "0 */5 * * * *",
"runOnStartup": false,
"useMonitor": true
}
]
}
// C# isolated worker — Program.cs
[Function("TimerTrigger")]
public void Run(
[TimerTrigger("0 */5 * * * *")] TimerInfo timerInfo,
FunctionContext context)
{
var logger = context.GetLogger("TimerTrigger");
logger.LogInformation($"Timer fired at: {DateTime.Now}");
}How Azure Differs from Standard Crontab
Azure Functions uses 6-field NCRONTAB with seconds as the first field. This is the opposite order from AWS EventBridge (which adds year as the 6th field). Azure supports sub-minute scheduling, which no other common platform offers.
Common Gotchas & Pitfalls
The first field is SECONDS, not minutes — '0 */5 * * * *' means every 5 minutes, not every 5 seconds.
Sub-minute scheduling is supported — '*/30 * * * * *' runs every 30 seconds.
Timezone defaults to UTC. Set WEBSITE_TIME_ZONE app setting (Windows: 'Eastern Standard Time'; Linux: 'America/New_York').
Use '%ScheduleExpression%' syntax to reference an app setting for the cron string, enabling environment-specific schedules.
runOnStartup: true will trigger the function when the host starts — avoid in production to prevent unexpected runs after deployment.
useMonitor: true persists schedule state to blob storage, preventing duplicate executions in multi-instance deployments.
The Consumption plan may have cold starts — consider Premium plan for time-sensitive scheduled jobs.
Other Platform Guides
More Cron Expression Tools
Translate, build, test, and reference cron expressions — all in one place.