代码之家  ›  专栏  ›  技术社区  ›  userMod2

Azure函数-Cron触发器-每秒正常,但不是每分钟

  •  0
  • userMod2  · 技术社区  · 6 年前

    我正在尝试为Azure函数计时器触发器中的每一分钟创建一个CRON。

    根据文件我发现: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer#cron-examples

    "0 */1 * * * *"

    "*/1 * * * * *" 每秒钟都跑。

    function.json 看起来像这样:

    {
      "bindings": [
        {
          "name": "myTimer",
          "type": "timerTrigger",
          "direction": "in",
          "schedule": "0 */1 * * * *"
        }
      ],
      "scriptFile": "../dist/TriggerWork/index.js"
    }
    
    0 回复  |  直到 6 年前
        1
  •  3
  •   Joey Cai    6 年前

    我可以复制你的问题 {AzureWebJobsStorage} 中的连接字符串项 local.settings.json 在格式上不匹配: enter image description here

    {
        "IsEncrypted": false,
      "Values": {
        "AzureWebJobsStorage": "{AzureWebJobsStorage}",
        "FUNCTIONS_WORKER_RUNTIME": "dotnet"
      }
    }
    

    有关更多详细信息,请参阅类似的 issue .