部署后不会触发Azure Function计时器触发器

时间:2020-10-01 22:51:08

标签: azure azure-functions timer-trigger

我有这样的计时器触发功能设置

public class PBARCronTrigger
{
    private readonly eReserveFunctions _settings;

    public PBARCronTrigger(IOptions<eReserveFunctions> settings)
    {
        _settings = settings.Value;
    }

    [FunctionName("PBARCronTrigger")]
    public async Task Run([TimerTrigger("%PBARCron%")] TimerInfo myTimer, ILogger log)
    {
        log.LogInformation($"PBARCronTrigger function executing at: {DateTime.Now}");

        using (var client = new HttpClient())

并且我将PBARCron的应用设置设置为每5分钟一次

enter image description here

,但触发器未触发。我连接到实时日志,没有任何反应。它一直说“过去x分钟没有新踪迹”

1 个答案:

答案 0 :(得分:1)

您的Cron表情在我看来不正确。在evaluator中对其进行检查甚至表明它是非标准的,并且可能无法在所有环境中正常工作。

我认为您想要的是0-55/5 * * * *,或更简单地说,是*/5 * * * *