I'm able to create http trigger functions and execute them no problem, but when I create a timer function, I get the following error:
The listener for function 'Functions.CheckForWinnersOnTimer' was unable to start. Microsoft.WindowsAzure.Storage: Settings must be of the form "name=value".
This is with no alteration of the template code when I create the function.
module.exports = async function (context, myTimer) {
var timeStamp = new Date().toISOString();
if (myTimer.IsPastDue)
{
context.log('JavaScript is running late!');
}
context.log('JavaScript timer trigger function ran!', timeStamp);
};
Why is that? I appreciate any help!
This error is what you faced know.
Given that there is nothing wrong with your code, I think the problem should be caused by local.settings.json. Note the format of the value of AzureWebJobsStorage.
If you are using a local virtual storage simulator, then you should fill in UseDevelopmentStorage=true. If you choose Storage Account on Azure, then you should go here to copy the values and fill in AzureWebJobsStorage:
An example of local.settings.json using a local storage emulator:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "node"
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.