我想将我的Azure函数安排为:11:00 AM for Monday to Friday , 2:30 AM for Saturday & Sunday
我该怎么写cron表达式呢?
请帮帮忙。
发布于 2021-08-16 07:23:15
不幸的是,您需要有两个azure函数
public static void RunMonFriday([TimerTrigger("0 0 11 * * 1-5")]TimerInfo
myTimer, ILogger log) {
// Call method to job
}
public static void RunSatSun([TimerTrigger("0 30 2 * * 6-7")]TimerInfo m
yTimer, ILogger log){
// Call method to job
}发布于 2021-08-17 07:24:43
您可以尝试在您的管道中使用带有环境的Invoke Azure function。
下面是一个示例:

在Azure devops中配置schedule in your pipeline。下面是一个示例:
# YAML file in the main branch
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- master
- cron: "0 12 * * 0"
displayName: Weekly Sunday build
branches:
include:
- masterhttps://stackoverflow.com/questions/68798766
复制相似问题