这是 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 格式的第二个字段是小时,所以它对我来说没有意义。谁能解释一下吗?
最佳答案
函数不使用常规 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.
关于azure - Microsoft 令人困惑的 CRON 作业答案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76085992/