Azure Functions timer trigger CRON expressions: useful resources
Introduction
Azure Functions is one of Microsoft’s serverless cloud offerings. It allows you to run a piece of code in the cloud that can be triggered by a wide range of events, including a timer trigger to run a function based on a schedule.
You specify a schedule with an NCRON expression, which is similar to a CRON expression, except that it also has a field to indicate seconds.
Below are some helpful resources for working with these expressions.
The NCronTab library
NCrontab for .NET is a library written in C# by Atif Aziz, and is used by Azure Functions to parse NCRON expressions. You can find it on GitHub.
Cheat sheet
Armin Reiter created a cool cheat sheet with a nice explanation and a bunch of example NCRON expressions that you can use with Azure Functions. Check it out here.
Expression tester
Raju Golla alerted me to another handy resource, called the NCrontab Expression Tester. It’s an online tool that lets you test both NCRON and CRON expressions, to make sure that your schedule results in the time occurrences you expect.
Thanks for reading!