Azure函数计时器触发器在部署时不触发

标签 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 分钟内没有新的跟踪”

最佳答案

你的 cron 表达式在我看来不正确。在 evaluator 中检查它甚至声明它是非标准的,可能不适用于所有环境。

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

关于Azure函数计时器触发器在部署时不触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64164152/

相关文章:

c# - 在Azure函数中将Post文件转换为Pdf

azure-functions - Azure Function App 运行时在 Visual Studio 2019 版本 16.11.4 中不可用

azure - 当函数应用程序横向扩展时,如何监控其实例数量?

Azure Webjob 计时器触发器不触发

azure - 计时器触发器 Azure Function 停止工作,没有任何更改

windows - Azure 资源管理器 : The Future of Cloud Services

Azure Scaleset - 是否有 Get-AzureRmVmssDiagnosticsExtension

c# - Azure 移动应用服务客户端上如何处理孤立记录?

Azure - 具有静态 IP 的简单反向代理

c# - Azure 函数 TimerTrigger 仅运行一次