Azure Functions 的应用设置参考App settings reference for Azure Functions

函数应用中的应用设置包含对该函数应用的所有函数产生影响的全局配置选项。App settings in a function app contain global configuration options that affect all functions for that function app. 在本地运行时,这些设置将作为本地环境变量进行访问。When you run locally, these settings are accessed as local environment variables. 本文列出可在函数应用中使用的应用设置。This article lists the app settings that are available in function apps.

可以通过以下几种方法添加、更新和删除函数应用设置:There are several ways that you can add, update, and delete function app settings:

host.json 文件和 local.settings.json 文件中提供了其他全局配置选项。There are other global configuration options in the host.json file and in the local.settings.json file.

备注

可以使用应用程序设置替代 host.json 设置值,而不必更改 host.json 文件本身。You can use application settings to override host.json setting values without having to change the host.json file itself. 这对于需要针对特定环境配置或修改特定 host.json 设置的方案很有用。This is helpful for scenarios where you need to configure or modify specific host.json settings for a specific environment. 这也让你可以更改 host.json 设置,而不必重新发布项目。This also lets you change host.json settings without having to republish your project. 若要了解详细信息,请参阅 host.json 参考文章To learn more, see the host.json reference article.

APPINSIGHTS_INSTRUMENTATIONKEYAPPINSIGHTS_INSTRUMENTATIONKEY

Application Insights 的检测密钥。The instrumentation key for Application Insights. 仅使用 APPINSIGHTS_INSTRUMENTATIONKEYAPPLICATIONINSIGHTS_CONNECTION_STRING 中的一个。Only use one of APPINSIGHTS_INSTRUMENTATIONKEY or APPLICATIONINSIGHTS_CONNECTION_STRING. 有关详细信息,请参阅监视 Azure FunctionsFor more information, see Monitor Azure Functions.

Key 示例值Sample value
APPINSIGHTS_INSTRUMENTATIONKEYAPPINSIGHTS_INSTRUMENTATIONKEY 55555555-af77-484b-9032-64f83bb83bb55555555-af77-484b-9032-64f83bb83bb

APPLICATIONINSIGHTS_CONNECTION_STRINGAPPLICATIONINSIGHTS_CONNECTION_STRING

Application Insights 的连接字符串。The connection string for Application Insights. 当函数应用需要使用连接字符串进行支持的已添加自定义项时,请使用 APPLICATIONINSIGHTS_CONNECTION_STRING,而不要使用 APPINSIGHTS_INSTRUMENTATIONKEYUse APPLICATIONINSIGHTS_CONNECTION_STRING instead of APPINSIGHTS_INSTRUMENTATIONKEY when your function app requires the added customizations supported by using the connection string. 有关详细信息,请参阅连接字符串For more information, see Connection strings.

Key 示例值Sample value
APPLICATIONINSIGHTS_CONNECTION_STRINGAPPLICATIONINSIGHTS_CONNECTION_STRING InstrumentationKey=[key];IngestionEndpoint=[url];LiveEndpoint=[url];ProfilerEndpoint=[url];SnapshotEndpoint=[url];InstrumentationKey=[key];IngestionEndpoint=[url];LiveEndpoint=[url];ProfilerEndpoint=[url];SnapshotEndpoint=[url];

AZURE_FUNCTION_PROXY_DISABLE_LOCAL_CALLAZURE_FUNCTION_PROXY_DISABLE_LOCAL_CALL

默认情况下,Functions 代理使用快捷方式从代理直接将 API 调用发送到同一函数应用中的函数。By default, Functions proxies use a shortcut to send API calls from proxies directly to functions in the same function app. 使用此快捷方式取代创建新的 HTTP 请求。This shortcut is used instead of creating a new HTTP request. 此设置让你能够禁用该快捷方式行为。This setting allows you to disable that shortcut behavior.

Key Value 说明Description
AZURE_FUNCTION_PROXY_DISABLE_LOCAL_CALLAZURE_FUNCTION_PROXY_DISABLE_LOCAL_CALL true 具有指向本地函数应用中函数的后端 URL 的调用不会直接发送到函数,Calls with a backend URL pointing to a function in the local function app won't be sent directly to the function. 相反,请求会定向回函数应用的 HTTP 前端。Instead, the requests are directed back to the HTTP frontend for the function app.
AZURE_FUNCTION_PROXY_DISABLE_LOCAL_CALLAZURE_FUNCTION_PROXY_DISABLE_LOCAL_CALL falsefalse 具有指向本地函数应用中函数的后端 URL 的调用会直接转发到函数。Calls with a backend URL pointing to a function in the local function app are forwarded directly to the function. 这是默认值。This is the default value.

AZURE_FUNCTION_PROXY_BACKEND_URL_DECODE_SLASHESAZURE_FUNCTION_PROXY_BACKEND_URL_DECODE_SLASHES

此设置控制字符 %2F 在路由参数插入后端 URL 时是否在路由参数中解码为斜杠。This setting controls whether the characters %2F are decoded as slashes in route parameters when they are inserted into the backend URL.

Key Value 说明Description
AZURE_FUNCTION_PROXY_BACKEND_URL_DECODE_SLASHESAZURE_FUNCTION_PROXY_BACKEND_URL_DECODE_SLASHES true 包含编码斜杠的路由参数已解码。Route parameters with encoded slashes are decoded.
AZURE_FUNCTION_PROXY_BACKEND_URL_DECODE_SLASHESAZURE_FUNCTION_PROXY_BACKEND_URL_DECODE_SLASHES falsefalse 所有路由参数均原样传递,这是默认行为。All route parameters are passed along unchanged, which is the default behavior.

例如,考虑位于 myfunction.com 域的函数应用的 proxies.json 文件。For example, consider the proxies.json file for a function app at the myfunction.com domain.

{
    "$schema": "http://json.schemastore.org/proxies",
    "proxies": {
        "root": {
            "matchCondition": {
                "route": "/{*all}"
            },
            "backendUri": "example.com/{all}"
        }
    }
}

如果 AZURE_FUNCTION_PROXY_BACKEND_URL_DECODE_SLASHES 设置为 true,则 URL example.com/api%2ftest 解析为 example.com/api/testWhen AZURE_FUNCTION_PROXY_BACKEND_URL_DECODE_SLASHES is set to true, the URL example.com/api%2ftest resolves to example.com/api/test. 默认情况下,URL 保持为 example.com/test%2fapi 不变。By default, the URL remains unchanged as example.com/test%2fapi. 有关详细信息,请参阅 Functions 代理For more information, see Functions proxies.

AZURE_FUNCTIONS_ENVIRONMENTAZURE_FUNCTIONS_ENVIRONMENT

在 2.x 和更高版本的 Functions 运行时中,基于运行时环境配置应用行为。In version 2.x and later versions of the Functions runtime, configures app behavior based on the runtime environment. 在初始化期间读取此值。This value is read during initialization. 可以将 AZURE_FUNCTIONS_ENVIRONMENT 设置为任何值,但支持三个值DevelopmentStagingProductionYou can set AZURE_FUNCTIONS_ENVIRONMENT to any value, but three values are supported: Development, Staging, and Production. 如果未设置 AZURE_FUNCTIONS_ENVIRONMENT,则在本地环境中默认为 Development,在 Azure 中默认为 ProductionWhen AZURE_FUNCTIONS_ENVIRONMENT isn't set, it defaults to Development on a local environment and Production on Azure. 应使用此设置(而不是 ASPNETCORE_ENVIRONMENT)来设置运行时环境。This setting should be used instead of ASPNETCORE_ENVIRONMENT to set the runtime environment.

AzureFunctionsJobHost__*AzureFunctionsJobHost__*

在 Functions 运行时的版本 2.x 和更高版本中,应用程序设置可以替代当前环境中的 host.json 设置。In version 2.x and later versions of the Functions runtime, application settings can override host.json settings in the current environment. 这些替代表示为名为 AzureFunctionsJobHost__path__to__setting 的应用程序设置。These overrides are expressed as application settings named AzureFunctionsJobHost__path__to__setting. 有关详细信息,请参阅替代 host.json 值For more information, see Override host.json values.

AzureWebJobsDashboardAzureWebJobsDashboard

用于存储日志并在门户上的“监视”选项卡中显示这些日志的可选存储帐户连接字符串。Optional storage account connection string for storing logs and displaying them in the Monitor tab in the portal. 此设置仅对面向 Azure Functions 运行时版本 1.x 的应用有效。This setting is only valid for apps that target version 1.x of the Azure Functions runtime. 存储帐户必须是支持 Blob、队列和表的通用帐户。The storage account must be a general-purpose one that supports blobs, queues, and tables. 有关详细信息,请参阅存储帐户要求To learn more, see Storage account requirements.

Key 示例值Sample value
AzureWebJobsDashboardAzureWebJobsDashboard DefaultEndpointsProtocol=https;AccountName=;AccountKey=;EndpointSuffix=core.chinacloudapi.cnDefaultEndpointsProtocol=https;AccountName=;AccountKey=;EndpointSuffix=core.chinacloudapi.cn

备注

为了获得更好的性能和体验,运行时版本 2.x 及更高版本使用 APPINSIGHTS_INSTRUMENTATIONKEY 和 App Insights 进行监视,而不是使用 AzureWebJobsDashboardFor better performance and experience, runtime version 2.x and later versions use APPINSIGHTS_INSTRUMENTATIONKEY and App Insights for monitoring instead of AzureWebJobsDashboard.

AzureWebJobsDisableHomepageAzureWebJobsDisableHomepage

true 表示禁用针对函数应用根 URL 显示的默认登录页。true means disable the default landing page that is shown for the root URL of a function app. 默认值为 falseDefault is false.

Key 示例值Sample value
AzureWebJobsDisableHomepageAzureWebJobsDisableHomepage true

如果省略此应用设置或将其设置为 false,则会显示类似于以下示例的页来响应 URL <functionappname>.chinacloudsites.cnWhen this app setting is omitted or set to false, a page similar to the following example is displayed in response to the URL <functionappname>.chinacloudsites.cn.

函数应用登录页

AzureWebJobsDotNetReleaseCompilationAzureWebJobsDotNetReleaseCompilation

true 表示在编译 .NET 代码时使用“发布”模式;false 表示使用“调试”模式。true means use Release mode when compiling .NET code; false means use Debug mode. 默认值为 trueDefault is true.

Key 示例值Sample value
AzureWebJobsDotNetReleaseCompilationAzureWebJobsDotNetReleaseCompilation true

AzureWebJobsFeatureFlagsAzureWebJobsFeatureFlags

要启用的 beta 功能的逗号分隔列表。A comma-delimited list of beta features to enable. 由这些标志启用的 Beta 功能尚未准备好用于生产,但在发布这些功能之前可针对试验目的启用这些功能。Beta features enabled by these flags are not production ready, but can be enabled for experimental use before they go live.

Key 示例值Sample value
AzureWebJobsFeatureFlagsAzureWebJobsFeatureFlags feature1,feature2feature1,feature2

AzureWebJobsSecretStorageTypeAzureWebJobsSecretStorageType

指定用于密钥存储的存储库或提供程序。Specifies the repository or provider to use for key storage. 目前,支持的存储库包括 blob 存储(“Blob”)和本地文件系统(“Files”)。Currently, the supported repositories are blob storage ("Blob") and the local file system ("Files"). 默认为在版本 2 中使用 blob,在版本 1 中使用文件系统。The default is blob in version 2 and file system in version 1.

Key 示例值Sample value
AzureWebJobsSecretStorageTypeAzureWebJobsSecretStorageType 文件Files

AzureWebJobsStorageAzureWebJobsStorage

Azure Functions 运行时针对除 HTTP 触发的函数以外的其他所有函数使用此存储帐户连接字符串。The Azure Functions runtime uses this storage account connection string for all functions except for HTTP triggered functions. 存储帐户必须是支持 Blob、队列和表的通用帐户。The storage account must be a general-purpose one that supports blobs, queues, and tables. 请参阅存储帐户存储帐户要求See Storage account and Storage account requirements.

Key 示例值Sample value
AzureWebJobsStorageAzureWebJobsStorage DefaultEndpointsProtocol=https;AccountName=[name];AccountKey=[key];EndpointSuffix=core.chinacloudapi.cnDefaultEndpointsProtocol=https;AccountName=[name];AccountKey=[key];EndpointSuffix=core.chinacloudapi.cn

AzureWebJobs_TypeScriptPathAzureWebJobs_TypeScriptPath

用于 TypeScript 的编译器的路径。Path to the compiler used for TypeScript. 允许根据需要重写默认值。Allows you to override the default if you need to.

Key 示例值Sample value
AzureWebJobs_TypeScriptPathAzureWebJobs_TypeScriptPath %HOME%\typescript%HOME%\typescript

FUNCTION_APP_EDIT_MODEFUNCTION_APP_EDIT_MODE

指示是否在 Azure 门户中启用了编辑。Dictates whether editing in the Azure portal is enabled. 有效值为“readwrite”和“readonly”。Valid values are "readwrite" and "readonly".

Key 示例值Sample value
FUNCTION_APP_EDIT_MODEFUNCTION_APP_EDIT_MODE readonlyreadonly

FUNCTIONS_EXTENSION_VERSIONFUNCTIONS_EXTENSION_VERSION

要在此函数应用中使用的 Functions 运行时版本。The version of the Functions runtime to use in this function app. 波浪符加主要版本号表示使用该主要版本的最新版本(例如“~2”)。A tilde with major version means use the latest version of that major version (for example, "~2"). 当同一主要版本的新版本可用时,会自动在函数应用中安装新版本。When new versions for the same major version are available, they are automatically installed in the function app. 若要让应用固定使用特定的版本,请使用完整版本号(例如“2.0.12345”)。To pin the app to a specific version, use the full version number (for example, "2.0.12345"). 默认值为“~2”。Default is "~2". ~1 让应用固定使用运行时版本 1.x。A value of ~1 pins your app to version 1.x of the runtime.

Key 示例值Sample value
FUNCTIONS_EXTENSION_VERSIONFUNCTIONS_EXTENSION_VERSION ~2~2

FUNCTIONS_V2_COMPATIBILITY_MODEFUNCTIONS_V2_COMPATIBILITY_MODE

此设置使函数应用能够在版本 3.x 运行时上以版本 2.x 兼容模式运行。This setting enables your function app to run in a version 2.x compatible mode on the version 3.x runtime. 仅当在将函数应用从运行时版本 2.x 升级到版本 3.x 时遇到问题的情况下,才使用此设置。Use this setting only if encountering issues when upgrading your function app from version 2.x to 3.x of the runtime.

重要

在更新应用以便在版本 3.x 上正常运行时,此设置仅用作短期解决方法。This setting is intended only as a short-term workaround while you update your app to run correctly on version 3.x. 只要 2.x 运行时受支持,此设置就受支持。This setting is supported as long as the 2.x runtime is supported. 如果在不使用此设置的情况下遇到阻止应用在版本 3.x 上运行的问题,请报告问题If you encounter issues that prevent your app from running on version 3.x without using this setting, please report your issue.

需要 FUNCTIONS_EXTENSION_VERSION 设置为 ~3Requires that FUNCTIONS_EXTENSION_VERSION be set to ~3.

Key 示例值Sample value
FUNCTIONS_V2_COMPATIBILITY_MODEFUNCTIONS_V2_COMPATIBILITY_MODE true

FUNCTIONS_WORKER_PROCESS_COUNTFUNCTIONS_WORKER_PROCESS_COUNT

指定语言工作进程的最大数量,其默认值为 1Specifies the maximum number of language worker processes, with a default value of 1. 允许的最大值为 10The maximum value allowed is 10. 函数调用均匀地分布在语言工作进程中。Function invocations are evenly distributed among language worker processes. 语言工作进程每 10 秒生成一次,直到达到 FUNCTIONS_WORKER_PROCESS_COUNT 设置的计数。Language worker processes are spawned every 10 seconds until the count set by FUNCTIONS_WORKER_PROCESS_COUNT is reached. 使用多个语言工作进程与缩放不同。Using multiple language worker processes is not the same as scaling. 当工作负荷混合使用 CPU 绑定和 I/O 绑定调用时,请考虑使用此设置。Consider using this setting when your workload has a mix of CPU-bound and I/O-bound invocations. 此设置适用于所有非 .NET 语言。This setting applies to all non-.NET languages.

Key 示例值Sample value
FUNCTIONS_WORKER_PROCESS_COUNTFUNCTIONS_WORKER_PROCESS_COUNT 22

FUNCTIONS_WORKER_RUNTIMEFUNCTIONS_WORKER_RUNTIME

要在函数应用中加载的语言辅助角色运行时。The language worker runtime to load in the function app. 这将对应于应用程序中使用的语言(例如,“dotnet”)。This will correspond to the language being used in your application (for example, "dotnet"). 对于使用多种语言的函数,需要将这些函数发布到多个应用(每个应用程序都有相应的辅助角色运行时值)。For functions in multiple languages you will need to publish them to multiple apps, each with a corresponding worker runtime value. 有效值为 dotnet (C#/F#)、node (JavaScript/TypeScript)、java (Java)、powershell (PowerShell)。Valid values are dotnet (C#/F#), node (JavaScript/TypeScript), java (Java), powershell (PowerShell).

Key 示例值Sample value
FUNCTIONS_WORKER_RUNTIMEFUNCTIONS_WORKER_RUNTIME dotnetdotnet

SCALE_CONTROLLER_LOGGING_ENABLESCALE_CONTROLLER_LOGGING_ENABLE

此设置当前处于预览状态。This setting is currently in preview.

此设置控制 Azure Functions 缩放控制器中的日志记录。This setting controls logging from the Azure Functions scale controller. 有关详细信息,请参阅缩放控制器日志For more information, see Scale controller logs.

Key 示例值Sample value
SCALE_CONTROLLER_LOGGING_ENABLESCALE_CONTROLLER_LOGGING_ENABLE AppInsights:VerboseAppInsights:Verbose

此键的值以 <DESTINATION>:<VERBOSITY> 格式提供,其定义如下:The value for this key is supplied in the format <DESTINATION>:<VERBOSITY>, which is defined as follows:

<DESTINATION> 日志发送到的目标。The destination to which logs are sent. 有效值为 AppInsightsBlobValid values are AppInsights and Blob.
使用 AppInsights 时,请确保在函数应用中启用 Application InsightsWhen you use AppInsights, make sure Application Insights is enabled in your function app.
将目标设置为 Blob 时,将在名为 azure-functions-scale-controller 的 blob 容器中创建日志,该容器位于 AzureWebJobsStorage 应用程序设置中设置的默认存储帐户中。When you set the destination to Blob, logs are created in a blob container named azure-functions-scale-controller in the default storage account set in the AzureWebJobsStorage application setting.
<VERBOSITY> 指定日志记录级别。Specifies the level of logging. 支持的值为 NoneWarningVerboseSupported values are None, Warning, and Verbose.
设置为 Verbose 时,缩放控制器将记录辅助角色计数每次更改的原因,以及有关将这些因素纳入决策的触发器的信息。When set to Verbose, the scale controller logs a reason for every change in the worker count, as well as information about the triggers that factor into those decisions. 详细日志包含触发器警告和缩放控制器运行前后触发器使用的哈希。Verbose logs include trigger warnings and the hashes used by the triggers before and after the scale controller runs.

注意

请勿让缩放控制器日志记录处于启用状态。Don't leave scale controller logging enabled. 启用日志记录,直到收集到的数据足以了解缩放控制器的行为方式,然后将其禁用。Enable logging until you have collected enough data to understand how the scale controller is behaving, and then disable it.

WEBSITE_CONTENTAZUREFILECONNECTIONSTRINGWEBSITE_CONTENTAZUREFILECONNECTIONSTRING

仅用于消耗计划。For Consumption plans only. 存储函数应用代码和配置的存储帐户的连接字符串。Connection string for storage account where the function app code and configuration are stored. 请参阅创建函数应用See Create a function app.

Key 示例值Sample value
WEBSITE_CONTENTAZUREFILECONNECTIONSTRINGWEBSITE_CONTENTAZUREFILECONNECTIONSTRING DefaultEndpointsProtocol=https;AccountName=[name];AccountKey=[key]DefaultEndpointsProtocol=https;AccountName=[name];AccountKey=[key]

WEBSITE_CONTENTSHAREWEBSITE_CONTENTSHARE

仅用于消耗计划。For Consumption plans only. 函数应用代码和配置的文件路径。The file path to the function app code and configuration. 与 WEBSITE_CONTENTAZUREFILECONNECTIONSTRING 结合使用。Used with WEBSITE_CONTENTAZUREFILECONNECTIONSTRING. 默认值是以函数应用名称开头的唯一字符串。Default is a unique string that begins with the function app name. 请参阅创建函数应用See Create a function app.

Key 示例值Sample value
WEBSITE_CONTENTSHAREWEBSITE_CONTENTSHARE functionapp091999e2functionapp091999e2

WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUTWEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT

函数应用可以横向扩展到的最大实例数。The maximum number of instances that the function app can scale out to. 默认值为无限制。Default is no limit.

重要

此设置处于预览状态。This setting is in preview. 添加了一个函数应用横向扩展上限属性,建议使用此方法限制横向扩展。An app property for function max scale out has been added and is the recommended way to limit scale out.

Key 示例值Sample value
WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUTWEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT 55

WEBSITE_NODE_DEFAULT_VERSIONWEBSITE_NODE_DEFAULT_VERSION

仅限 WindowsWindows only.
设置在 Windows 上运行函数应用时要使用的 Node.js 版本。Sets the version of Node.js to use when running your function app on Windows. 应使用波形符 (~) 让运行时使用目标主版本的最新可用版本。You should use a tilde (~) to have the runtime use the latest available version of the targeted major version. 例如,当设置为 ~10 时,将使用最新版本 Node.js 10。For example, when set to ~10, the latest version of Node.js 10 is used. 当目标主版本带有波形符时,无需手动更新次版本。When a major version is targeted with a tilde, you don't have to manually update the minor version.

Key 示例值Sample value
WEBSITE_NODE_DEFAULT_VERSIONWEBSITE_NODE_DEFAULT_VERSION ~10~10

WEBSITE_RUN_FROM_PACKAGEWEBSITE_RUN_FROM_PACKAGE

让函数应用从已装载的包文件运行。Enables your function app to run from a mounted package file.

Key 示例值Sample value
WEBSITE_RUN_FROM_PACKAGEWEBSITE_RUN_FROM_PACKAGE 11

有效值是解析为部署包文件位置的 URL 或 1Valid values are either a URL that resolves to the location of a deployment package file, or 1. 设置为 1 时,包必须位于 d:\home\data\SitePackages 文件夹中。When set to 1, the package must be in the d:\home\data\SitePackages folder. 使用此设置的 zip 部署时,包将自动上传到此位置。When using zip deployment with this setting, the package is automatically uploaded to this location. 在预览版中,此设置名为 WEBSITE_RUN_FROM_ZIPIn preview, this setting was named WEBSITE_RUN_FROM_ZIP. 有关详细信息,请参阅从包文件运行函数For more information, see Run your functions from a package file.

WEBSITE_TIME_ZONEWEBSITE_TIME_ZONE

允许为函数应用设置时区。Allows you to set the timezone for your function app.

Key (OS)OS 示例值Sample value
WEBSITE_TIME_ZONEWEBSITE_TIME_ZONE WindowsWindows 东部标准时间Eastern Standard Time

CRON 表达式使用的默认时区为协调世界时 (UTC)。The default time zone used with the CRON expressions is Coordinated Universal Time (UTC). 若要让 CRON 表达式基于其他时区,请为你的函数应用创建一个名为 WEBSITE_TIME_ZONE 的应用设置。To have your CRON expression based on another time zone, create an app setting for your function app named WEBSITE_TIME_ZONE.

此设置的值取决于运行函数应用的操作系统和计划。The value of this setting depends on the operating system and plan on which your function app runs.

操作系统Operating system 计划Plan Value
WindowsWindows AllAll 将值设置为所需时区的名称,如 Microsoft 时区索引中所示。Set the value to the name of the desired time zone as shown in the Microsoft Time Zone Index.

备注

Linux 消耗计划目前不支持 WEBSITE_TIME_ZONEWEBSITE_TIME_ZONE is not currently supported on the Linux Consumption plan.

例如东部标准时间 (Windows) 或美国/纽约 (Linux) 为 UTC-05:00 。For example, Eastern Standard Time (Windows) or America/New_York (Linux) is UTC-05:00. 若要让计时器触发器每天在美国东部时间上午 10:00 触发,可使用表示 UTC 时区的以下 NCRONTAB 表达式:To have your timer trigger fire at 10:00 AM EST every day, use the following NCRONTAB expression that accounts for UTC time zone:

"0 0 15 * * *"

或者为你的函数应用创建一个名为 WEBSITE_TIME_ZONE 的应用设置并将值设置为 Eastern Standard Time (Windows) 或 America/New_York (Linux),然后使用以下 NCRONTAB 表达式:Or create an app setting for your function app named WEBSITE_TIME_ZONE, set the value to Eastern Standard Time (Windows) or America/New_York (Linux), and then use the following NCRONTAB expression:

"0 0 10 * * *"

当使用 WEBSITE_TIME_ZONE,时间将针对特定时区中的时间更改进行调整,例如夏令时。When you use WEBSITE_TIME_ZONE, the time is adjusted for time changes in the specific timezone, such as daylight savings time.

后续步骤Next steps

了解如何更新应用设置Learn how to update app settings

查看 host.json 文件中的全局设置See global settings in the host.json file

查看应用服务应用的其他应用设置See other app settings for App Service apps