Category: Azure Functions

Azure Functions – Timer Trigger Cheat Sheet

This is a cheat sheet for azure function CRON expressions that are used by the TimerTrigger binding in azure functions.

Basic Syntax

The structure of the CRON expressions in Azure is:
{second} {minute} {hour} {day} {month} {day of the week}

Using Configuration

Instead of specifying the CROM pattern directly in the [TimerTrigger] attribute, you can give a config setting name. This is great for testing locally on a higher frequency than deployed.

[TimerTrigger("%account-number-clean-schedule%")]TimerInfo myTimer,

Cheat Sheet – Common Trigger Patterns

Description Syntax
Every Minute
(every time the seconds become zero)
0 * * * * * *
Every minute at 30 seconds 30 * * * * *
Every 2 Minutes 0 */2 * * * *
Every Hour at 5 past
(every time the seconds are zero and mins are 5)
0 5 * * * *
Every 15 minutes 9 to 5 Monday To Friday 0 */15 9-17 * * MON-FRI
Daily (midnight) 0 0 0 * * *
Daily at 3:30 am 0 30 3 * * *
First day of each month 0 0 0 1 * *
Every 2 Hours at 10 past, 7am -7pm Mon-Friday 0 10 7-19/2 * * 1-5