简体   繁体   中英

Make timer trigger function cron configurable from Azure DevOps release pipeline

I have one Timer trigger Azure function which runs on each 10 mins, cron is 0 */10 * * * *

I want to make this cron configurable from Azure release pipeline while deployment.

I have added the cron value in library variable like below,

在此处输入图像描述

I have used the same library variable in App settings of release pipeline.

在此处输入图像描述 在此处输入图像描述

If I try to deploy, it is showing the error in log like below. 在此处输入图像描述

I understood the error. The error is because during deployment the corn is splitted like below. But not sure how to solve the error so that the corn will not be splitted. Find the below log from release log in bold.

Trying to update App Service Application settings. "CornValue":"0","":"*"

The issue is solved and able to inject the value in from Pipeline as well.

Need to add double quotes for the value of cron in release pipeline, then the cron value will be put as is, it will not be splitted

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM