Azure functions: disable timer triggered functions when developing locally
Disable timer triggered azure functions when developing locally.
I love Azure Functions
Okay with that out of the way I can explain the following:
Problem:
When you are developing Azure functions locally using the azure function tools and runtime every time you start the functions runtime to test/debug some of your functions the timer triggered functions will run as well - as they should.
However if you are not working on those timer triggered functions it can be a pain that they keep triggering...
Don't disable the function
I saw a lot of solutions on the internet proposing you set disabled:true in your function.json file. That's fine and will work, but when you publish that function will still be disabled and that is not what you want. There is a better solution read on ...
Solution:
Let's say you have 3 functions:
- HttpTriggerFunction1
- MyCustomFunction
- TimerTriggeredFunction ==> this is the function you don't want to trigger
You can specify which functions should trigger in your host.json file which should be in the by adding the following
{
"functions": [
"HttpTriggerFunction1",
"MyCustomFunction"
]
}
eh voila the timer triggered function will not run.
More information at: https://github.com/Azure/Azure-Functions