C#以编程方式设置天蓝色函数时间触发 [英] C# set azure function time trigger programmatically

查看:67
本文介绍了C#以编程方式设置天蓝色函数时间触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个在时间触发器上工作的ac#Azure函数,在该触发器中,时间表将是可变的,即每个函数运行将确定下一次运行的时间,因此应该能够更改下一次运行的时间触发.

I would like to write a c# Azure Function working on a time trigger in which the schedule would be variable, i.e. each function run would determine the time of the next run and thus should be able to change the scheduled time of the next trigger.

推荐答案

由于

You can use a queue trigger with a queue output for this thanks to the NextVisibleTime property, it's a better choice than attempting to modify the timer schedule every run.

它还支持在发生故障(和中毒队列)时进行可配置的重试,因此它比计时器触发器更耐用.( https://docs.microsoft.com/zh-CN/azure/azure-functions/functions-bindings-storage-queue#handling-poison-queue-messages )

It also supports configurable retries upon failure (and a poison queue) so it's more durable than a timer trigger. (https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue#handling-poison-queue-messages)

这篇关于C#以编程方式设置天蓝色函数时间触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆