简体   繁体   中英

Azure Timer Function - Microsoft.WindowsAzure.Storage: Settings must be of the form "name=value"

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM