Search code examples
azureazure-functionstimer-trigger

Azure function with Timer Trigger is working but why does my resource keep running?


I've been using the new Azure Functions for 3 months now, and everything is working fine. I got a timer trigger set up to trigger every day. (see screenshot) enter image description here

But this Azure Function is only running <1 sec a day, but still the Resource is up and running all day. Every month I end up with an invoice of 60 eur/ 75 usd. For only running 1 sec a day?

Is there a way to use/configure Azure functions just once a day and not pay for the whole day?

Thanks!


Solution

  • Based on what you describe, you are most likely running your Function App in an App Service Plan. If you want to only pay for the time your function actually runs, you can instead use Consumption mode. For < 1 sec a day, there will be no charge at all.

    See https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale for details.