โจ Did you know you can run background jobs in Azure without any servers?
โจ Thatโs the power of a Timer Trigger in Azure Functions.
It helps you schedule code to run at fixed times.
You can clean up data, send reminders, or generate reports.
All with just a few lines of code.
C# example:
public static class TimerExample
{
[FunctionName("TimerExample")]
public static void Run(
[TimerTrigger("0 */5 * * * *")] TimerInfo myTimer,
ILogger log)
{
log.LogInformation($"Timer function executed at: {DateTime.Now}");
}
}
๐ The above code runs every 5 minutes.
๐ You can change the CRON expression for your schedule.
๐ก Simple. Fast. Reliable.
Where do you see timer triggers adding the most value in your projects?
Top comments (0)