I have Azure function with timer trigger.
public static void Run([TimerTrigger("0 */15 * * * *"), Disable("True")]TimerInfo myTimer, TraceWriter log)
Here the Disable("true")
is not working. it generates the function.json
as
"disabled": "True",
which is not correct. It should be "disabled": True,
Disable only accepts string value.
Is there any way to change this? or any other way to disable function?
Functions 2.x can be disabled individually via local.settings.json
in the following manner
{
"IsEncrypted": false,
"Values": {
"AzureWebJobs.MyFunctionNameOne.Disabled": "true",
"AzureWebJobs.MyFunctionNameTwo.Disabled": "true",
...
}
}
Ref: https://docs.microsoft.com/en-us/azure/azure-functions/disable-function#functions-2x---all-languages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With