时间触发的天蓝色功能在部署后立即触发

编程入门 行业动态 更新时间:2024-10-20 11:45:03
本文介绍了时间触发的天蓝色功能在部署后立即触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个每1小时触发一次的时间触发的天蓝色函数.我的要求是,它应每小时触发一次,但部署后也应立即触发一次? 使用cron表达式是实现此目的的唯一方法吗?

I have a time-triggered azure function triggered every 1 hour. My requirement is that, it should get triggered every hour but once also immediately after the deployment ? Is playing with cron expression my only way for this ?

推荐答案

没有与部署直接相关的东西.记录在此处的runOnStartup触发器运行时启动时可以使用您的函数,但不会由于部署而导致运行时启动.

There isn't something directly tied to the deployment. The runOnStartup setting, documented here, triggers your function when the runtime starts, but won't cause the runtime to start as a result of a deployment.

您最好的选择可能是自定义您的部署,如此处记录的,并在部署完成后调用您的函数(通过发出HTTP请求).您可以共享代码,并拥有一个HTTP触发函数,该函数使用与计划中运行的计时器函数相同的逻辑.

Your best option would likely be to customize your deployment, as documented here, and invoke your function (by issuing an HTTP request) once the deployment completes. You can share the code and have an HTTP triggered function that uses the same logic as the timer function that runs on a schedule.

更多推荐

时间触发的天蓝色功能在部署后立即触发

本文发布于:2023-11-27 07:26:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637125.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:天蓝色   功能   时间

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!