gpt4 book ai didi

azure - Microsoft 令人困惑的 CRON 作业答案

转载 作者:行者123 更新时间:2023-12-03 06:17:45 25 4
gpt4 key购买 nike

这是 Microsoft AZ-204 练习论文中的问题:

You create a batch routine by using a timer trigger in Azure Functions. You need to configure the batch routine to execute every 15 minutes. Which code segment should you use?

正如您在下面的屏幕截图中看到的,建议的答案是 *0 /15 * * * 1-5

据我所知,CRON 格式的第二个字段是小时,所以它对我来说没有意义。谁能解释一下吗?

enter image description here

最佳答案

函数不使用常规 UNIX cron 表达式。

Azure Functions uses the NCronTab library to interpret NCRONTAB expressions. An NCRONTAB expression is similar to a CRON expression except that it includes an additional sixth field at the beginning to use for time precision in seconds:

{second} {minute} {hour} {day} {month} {day-of-week}

另外:

NCRONTAB expression supports both five field and six field format. The sixth field position is a value for seconds which is placed at the beginning of the expression.

来源:https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=python-v2%2Cin-process&pivots=programming-language-csharp#ncrontab-expressions

关于azure - Microsoft 令人困惑的 CRON 作业答案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76085992/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com