What is the simplest way to run a timer-triggered Azure Function locally once?

后端 未结 7 901
醉话见心
醉话见心 2020-12-13 12:03

I have a few C# Azure Functions that run on a schedule using timer triggers. I\'ve set them up like so, where %TimerSchedule% refers to a cron expression in the

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 12:21

    Just add another function with HTTP trigger type within the same class, add your code, or call your Run method from that function and invoke it from your browser.

    Be sure to comment/remove that function when deployed to prod, or you will have the ability to trigger the function via HTTP calls in prod.

提交回复
热议问题