Skip to content

Commit 6eb8d25

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into avesanRefresh
2 parents b6e3bf4 + 4c49df9 commit 6eb8d25

File tree

786 files changed

+2909
-2110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

786 files changed

+2909
-2110
lines changed
-22.9 KB
Loading

articles/active-directory-b2c/service-limits.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ As a protection for our customers, Microsoft places some restrictions on telepho
190190
| 221 | Senegal | 10 | 30 |
191191
| 223 | Mali | 20 | 100 |
192192
| 224 | Guinea | 20 | 100 |
193-
| 225 | Ivory Coast| 10 | 30 |
193+
| 225 | Côte d’Ivoire | 10 | 30 |
194194
| 226 | Burina Faso | 10 | 30 |
195195
| 228 | Togo | 10 | 30 |
196196
| 233 | Ghana| 10 | 30 |
@@ -219,7 +219,7 @@ As a protection for our customers, Microsoft places some restrictions on telepho
219219
| 60 | Malaysia | 50 | 200 |
220220
| 62 | Indonesia | 50 | 200 |
221221
| 63 | Philippines | 50 | 200 |
222-
| 670 | East Timor (Timor-Leste)  | 10 | 30 |
222+
| 670 | Timor-Leste  | 10 | 30 |
223223
| 7 | Russia | 100 | 1000 |
224224
| 84 | Vietnam | 150 | 500 |
225225
| 855 | Cambodia | 50 | 200 |
@@ -228,7 +228,7 @@ As a protection for our customers, Microsoft places some restrictions on telepho
228228
| 92 | Pakistan| 100 | 1000 |
229229
| 93 | Afghanistan  | 10 | 30 |
230230
| 94 | Sri Lanka | 100 | 500 |
231-
| 95 | Myanmar (Burma) | 10 | 30 |
231+
| 95 | Myanmar | 10 | 30 |
232232
| 961 | Lebanon  | 10 | 30 |
233233
| 967 | Yemen |10 | 30 |
234234
| 970 | State of Palestine| 10 | 30 |

articles/app-service/includes/deploy-intelligent-apps/deploy-intelligent-apps-linux-python-pivot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ After the files are updated, prepare your environment variables to work with Ope
8181

8282
### API keys and endpoints
8383

84-
To make calls to OpenAI with your client, you need to first get the keys and endpoint values from Azure OpenAI or OpenAI, and add them as secrets for use in your application. Save the values for later use.
84+
To make calls to OpenAI with your client, first get the keys and endpoint values from Azure OpenAI or OpenAI, and add them as secrets for use in your application. Save the values for later use.
8585

8686
For Azure OpenAI, see [this documentation](/azure/ai-services/openai/quickstart?pivots=programming-language-csharp&tabs=command-line%2Cpython#retrieve-key-and-endpoint) to retrieve the following values. If you're planning to use a [managed identity](../../overview-managed-identity.md) to secure your app, you don't need the API key value.
8787

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
author: msangapu-msft
3+
ms.service: azure-app-service
4+
ms.topic: include
5+
ms.date: 05/01/2025
6+
ms.author: msangapu
7+
---
8+
9+
### <a name="acceptablefiles"></a>Supported file types for scripts or programs
10+
11+
### [Windows code](#tab/windowscode)
12+
13+
The following file types are supported:
14+
15+
- Using Windows cmd: *.cmd*, *.bat*, *.exe*
16+
- Using PowerShell: *.ps1*
17+
- Using Bash: *.sh*
18+
- Using Node.js: *.js*
19+
- Using Java: *.jar*
20+
21+
The necessary runtimes to run these file types are already installed on the web app instance.
22+
23+
### [Windows container](#tab/windowscontainer)
24+
25+
The following file types are supported using Windows cmd: *.cmd*, *.bat*, *.exe*
26+
27+
In addition to these file types, WebJobs written in the language runtime of the Windows container app are supported.
28+
29+
- Example: *.jar* and *.war* scripts are supported if the container is a Java app.
30+
31+
### [Linux code](#tab/linuxcode)
32+
33+
*.sh* scripts are supported.
34+
35+
In addition to shell scripts, WebJobs written in the language of the selected runtime are also supported.
36+
37+
- Example: Python (*.py*) scripts are supported if the main site is a Python app.
38+
39+
### [Linux container](#tab/linuxcontainer)
40+
41+
*.sh* scripts are supported.
42+
43+
In addition to shell scripts, WebJobs written in the language runtime of the Linux container app are also supported.
44+
45+
- Example: Node (*.js*) scripts are supported if the site is a Node.js app.
46+
47+
---
133 KB
Loading

articles/app-service/overview-webjobs.md

Lines changed: 88 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,107 @@ title: "App Service WebJobs Overview"
33
description: "An overview of Azure WebJobs, covering its types, supported platforms, file types, scheduling with NCRONTAB expressions, deployment options, and benefits for background processing within Azure App Service."
44
keywords: "Azure WebJobs, App Service, background processing, triggered jobs, continuous jobs, NCRONTAB, deployment, Azure, technical overview"
55
ms.topic: overview
6-
ms.date: 5/1/2025
6+
ms.date: 5/2/2025
77
author: msangapu-msft
88
ms.author: msangapu
99
ms.reviewer: ggailey
10-
#Customer intent: As a web developer, I want to leverage background tasks to keep my application running smoothly.
10+
ms.collection: ce-skilling-ai-copilot
11+
#Customer intent: I want to understand what WebJobs are, how they work with Azure App Service, and whether they’re the right solution for running background tasks in my app. I'm looking for guidance on supported platforms, types of jobs, deployment options, and how to get started or go deeper based on my use case.
1112
---
1213

1314
# App Service WebJobs overview
1415

15-
## Introduction
16-
Azure WebJobs is a built-in feature of Azure App Service that enables you to run background tasks, scripts, and programs alongside your web, API, or mobile applications without needing separate infrastructure. This integration simplifies the automation of routine or resource-intensive operations—such as data processing, file cleanups, or queue monitoring—by leveraging the same scalable, managed environment as your primary application.
16+
Azure WebJobs is a built-in feature of [Azure App Service](overview.md) that enables you to run background tasks, scripts, and programs alongside your web, API, or mobile applications. WebJobs simplify automation for common operations—such as data processing, image resizing, queue handling, or file cleanup—by running in the same scalable, managed environment as your application.
17+
18+
## Choosing WebJobs
19+
20+
WebJobs are a good fit when:
21+
- You're already hosting your application on App Service.
22+
- You want to deploy and manage background tasks together with your app.
23+
- You don't require a separate scaling model or event-based triggers beyond basic scheduling or queue polling.
24+
25+
For more scalable, independently hosted, or event-driven workloads, consider using [Azure Functions](../azure-functions/functions-overview.md).
26+
27+
## Key capabilities
28+
29+
- Run background tasks without provisioning separate infrastructure
30+
- Trigger jobs on demand, on a schedule, or continuously
31+
- Use multiple languages and scripting platforms
32+
- Deploy using the Azure portal, Visual Studio, zip deployment, or automation pipelines
33+
- Monitor and troubleshoot using Kudu or App Service diagnostics
34+
- Integrate with other Azure services such as Azure Storage, Event Hubs, or Service Bus
1735

1836
## WebJob types
19-
WebJobs come in two primary types:
20-
- **Triggered WebJobs:** Run on demand, on a schedule, or in response to specific events.
21-
- **Continuous WebJobs:** Operate perpetually, ensuring that critical background processes are always active.
2237

23-
For scheduled tasks, NCRONTAB expressions are used to define precise execution intervals, giving you fine-grained control over when the jobs run.
38+
WebJobs come in three main types:
39+
40+
- **Triggered WebJobs**: Run on demand or in response to specific events. You can trigger them manually or from a service like Azure Storage.
41+
- **Scheduled WebJobs**: A specialized type of triggered WebJob that runs on a defined schedule using a `settings.job` file with [NCRONTAB expressions](webjobs-create.md#ncrontab-expressions).
42+
- **Continuous WebJobs**: Run persistently in the background while your App Service app is running. Ideal for queue polling or background monitoring tasks.
43+
44+
45+
:::image type="content" border="false" source="media/overview-webjobs/webjob-types-app-service.png" alt-text="Diagram overview of WebJobs in Azure App Service, showing job types.":::
2446

2547
## Supported platforms and file types
26-
Azure WebJobs is fully supported on Windows code, Windows containers, Linux code, and Linux containers.
2748

28-
Supported file types include:
29-
- Windows command scripts (`.cmd`, `.bat`, `.exe`)
30-
- PowerShell scripts (`.ps1`)
31-
- Bash scripts (`.sh`)
32-
- Scripting languages such as Python (`.py`), PHP (`.php`), Node.js (`.js`), and F# (`.fsx`)
49+
WebJobs are supported on the following App Service hosting options:
50+
51+
- Windows code
52+
- Windows containers
53+
- Linux code
54+
- Linux containers
55+
56+
Supported file/script types include:
57+
58+
- Windows executables and scripts: `.exe`, `.cmd`, `.bat`
59+
- PowerShell scripts: `.ps1`
60+
- Bash scripts: `.sh`
61+
- Scripting languages: Python (`.py`), Node.js (`.js`), PHP (`.php`), F# (`.fsx`)
62+
- Any language runtime included in your container app
63+
64+
This versatility enables you to integrate WebJobs into a wide range of application architectures using the tools and languages you're already comfortable with.
65+
66+
## Deployment options
67+
68+
You can deploy WebJobs using several methods:
69+
70+
- **Azure portal or zip upload**: Manually upload your script or job files.
71+
- **Visual Studio**: Deploy directly with your ASP.NET app to Windows App Service.
72+
- **CI/CD pipelines**: Automate deployment with GitHub Actions, Azure DevOps, or Azure CLI.
73+
- **ARM/Bicep templates**: Deploy infrastructure and jobs declaratively.
74+
75+
WebJobs also provide **built-in logging** via Kudu and integration with App Service diagnostics to help you monitor job activity and troubleshoot issues.
76+
77+
## Scaling considerations
78+
79+
WebJobs scale together with your App Service plan. If your app is configured to scale out to multiple instances, your WebJobs will run on each instance as appropriate:
80+
- **Triggered WebJobs** will run on a single instance by default.
81+
- **Continuous WebJobs** can be configured to run on all instances or a single one using the `WEBJOBS_RUN_ONCE` setting.
82+
83+
If you need independently scalable or event-driven execution, [Azure Functions](../azure-functions/functions-overview.md) may be more appropriate.
84+
85+
## Best practices
86+
87+
- Use **triggered** WebJobs for ad hoc or scheduled operations.
88+
- Use **continuous** WebJobs only when the task needs to run constantly (e.g., polling a queue).
89+
- Implement **retry logic and error handling** within your scripts.
90+
- Use **application logging** and **Kudu logs** to monitor job behavior.
91+
- Keep job logic **separate from main app logic** when possible.
92+
- Use **storage-based triggers** (e.g., Azure Queues) for reliable, decoupled communication.
93+
94+
95+
## Choose your scenario
3396

34-
This versatility enables integration of WebJobs into a wide range of application architectures.
97+
| Goal | Article |
98+
|------|---------|
99+
| Quickly run a scheduled WebJob | [Quickstart: Create a scheduled WebJob](quickstart-webjobs.md) |
100+
| Build a WebJob manually using scripts or code | [Create a WebJob in Azure App Service](webjobs-create.md) |
101+
| Follow a tutorial using a practical use case | [Tutorial: Run background tasks with WebJobs](tutorial-webjobs.md) |
35102

36-
## Benefits and deployment
37-
By incorporating WebJobs into your App Service, you reduce operational overhead while gaining robust capabilities for background processing. Deployment options are flexible and include:
38-
- **Visual Studio Integration:** Seamlessly deploy WebJobs alongside your ASP.NET applications.
39-
- **Azure Portal and ZIP Deployment:** Easily upload and deploy your WebJob packages.
40-
- **Automated Pipelines:** Use ARM templates or Git for automated deployments.
103+
## <a name="NextSteps"></a> Next steps
41104

42-
Additionally, WebJobs provide built-in logging and monitoring, as well as seamless integration with other Azure services, making them a cost-effective and efficient solution for automating background tasks.
105+
- [Background jobs best practices – Azure Architecture Center](/azure/architecture/best-practices/background-jobs)
106+
- [Develop WebJobs using Visual Studio](webjobs-dotnet-deploy-vs.md)
107+
- [Get started with the WebJobs SDK](webjobs-sdk-get-started.md)
108+
- [Use the WebJobs SDK to build advanced jobs](webjobs-sdk-how-to.md)
109+
- [Kudu WebJobs reference on GitHub](https://github.com/projectkudu/kudu/wiki/WebJobs)

articles/app-service/quickstart-webjobs.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 'Create a scheduled WebJob using a prebuilt script'
33
description: Quickly schedule a time-based WebJob in Azure App Service using a prebuilt script for Windows or Linux.
44
ms.topic: quickstart
5-
ms.date: 4/24/2025
5+
ms.date: 5/2/2025
66
author: msangapu-msft
77
ms.author: msangapu
88
ms.reviewer: glenga
@@ -22,7 +22,7 @@ WebJobs in Azure App Service let you run scripts or programs as background tasks
2222
- Enable **Always On** in the App Service settings: [Configure Always On](configure-common.md?tabs=portal#configure-general-settings)
2323
- For Windows containers and all Linux apps, set the app setting `WEBSITE_SKIP_RUNNING_KUDUAGENT = false`
2424

25-
## Step 1: Download a sample WebJob
25+
## Download a sample WebJob
2626

2727
Choose the version that matches your App Service OS:
2828

@@ -33,7 +33,7 @@ Choose the version that matches your App Service OS:
3333

3434
Each zip contains a single script that prints the current system date and time.
3535

36-
## Step 2: Add the WebJob in the Azure portal
36+
## Add the WebJob in the Azure portal
3737

3838
1. In the [Azure portal](https://portal.azure.com), go to your **App Service** app.
3939
2. In the left menu, select **WebJobs** > **+ Add**.
@@ -49,13 +49,13 @@ Each zip contains a single script that prints the current system date and time.
4949

5050
4. Select **OK** to create the WebJob.
5151

52-
## Step 3: Monitor WebJob logs
52+
## Verify the WebJob
5353

5454
1. Go to the **WebJobs** tab.
5555
2. Select your WebJob and open **Logs**.
5656
3. Confirm that it runs every minute and prints the system time.
5757

58-
## Step 4: Clean up
58+
## Clean up
5959

6060
To remove the WebJob, select the WebJob in the portal and select `Delete`.
6161

articles/app-service/reference-app-settings.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The following environment variables are related to the app environment in genera
4141
| `WEBSITE_PROACTIVE_AUTOHEAL_ENABLED` | By default, a VM instance is proactively corrected when it uses more than 90% of allocated memory for more than 30 seconds, or when 80% of the total requests in the last two minutes take longer than 200 seconds. If a VM instance triggers one of these rules, the recovery process is an overlapping restart of the instance.<br/><br/>Set to `false` to disable this recovery behavior. The default is `true`.<br/><br/>For more information, see the [Introducing Proactive Auto Heal](https://azure.github.io/AppService/2017/08/17/Introducing-Proactive-Auto-Heal.html) blog post. |
4242
| `WEBSITE_PROACTIVE_CRASHMONITORING_ENABLED` | Whenever the w3wp.exe process on a VM instance of your app crashes due to an unhandled exception for more than three times in 24 hours, a debugger process is attached to the main worker process on that instance. The debugger process collects a memory dump when the worker process crashes again. This memory dump is then analyzed, and the call stack of the thread that caused the crash is logged in your App Service logs.<br/><br/>Set to `false` to disable this automatic monitoring behavior. The default is `true`.<br/><br/>For more information, see the [Proactive Crash Monitoring in Azure App Service](https://azure.github.io/AppService/2021/03/01/Proactive-Crash-Monitoring-in-Azure-App-Service.html) blog post. |
4343
| `WEBSITE_DAAS_STORAGE_SASURI` | During crash monitoring (proactive or manual), the memory dumps are deleted by default. To save the memory dumps to a storage blob container, specify the shared access signature (SAS) URI. |
44-
| `WEBSITE_CRASHMONITORING_ENABLED` | Set to `true` to enable [crash monitoring](https://azure.github.io/AppService/2020/08/11/Crash-Monitoring-Feature-in-Azure-App-Service.html) manually. You must also set `WEBSITE_DAAS_STORAGE_SASURI` and `WEBSITE_CRASHMONITORING_SETTINGS`. The default is `false`.<br/><br/>This setting has no effect if remote debugging is enabled. Also, if this setting is set to `true`, [proactive crash monitoring](https://azure.github.io/AppService/2021/03/01/Proactive-Crash-Monitoring-Feature-in-Azure-App-Service.html) is disabled. |
44+
| `WEBSITE_CRASHMONITORING_ENABLED` | Set to `true` to enable [crash monitoring](https://azure.github.io/AppService/2020/08/11/Crash-Monitoring-Feature-in-Azure-App-Service.html) manually. You must also set `WEBSITE_DAAS_STORAGE_SASURI` and `WEBSITE_CRASHMONITORING_SETTINGS`. The default is `false`.<br/><br/>This setting has no effect if remote debugging is enabled. Also, if this setting is set to `true`, [proactive crash monitoring](https://azure.github.io/AppService/2021/03/01/Proactive-Crash-Monitoring-in-Azure-App-Service.html) is disabled. |
4545
| `WEBSITE_CRASHMONITORING_SETTINGS` | JSON with the following format:`{"StartTimeUtc": "2020-02-10T08:21","MaxHours": "<elapsed-hours-from-StartTimeUtc>","MaxDumpCount": "<max-number-of-crash-dumps>"}`. Required to configure [crash monitoring](https://azure.github.io/AppService/2020/08/11/Crash-Monitoring-Feature-in-Azure-App-Service.html) if `WEBSITE_CRASHMONITORING_ENABLED` is specified. To log the call stack without saving the crash dump in the storage account, add `,"UseStorageAccount":"false"` in the JSON. |
4646
| `REMOTEDEBUGGINGVERSION` | Remote debugging version. |
4747
| `WEBSITE_CONTENTAZUREFILECONNECTIONSTRING` | By default, App Service creates a shared storage for you at app creation. To use a custom storage account instead, set to the connection string of your storage account. For functions, see [App settings reference for Azure Functions](../azure-functions/functions-app-settings.md#website_contentazurefileconnectionstring).<br/><br/>Example: `DefaultEndpointsProtocol=https;AccountName=<name>;AccountKey=<key>` |
@@ -180,6 +180,7 @@ This section shows the configurable runtime settings for each supported language
180180
| `WEBSITE_JAVA_MAX_HEAP_MB` | Java maximum heap, in megabytes. This setting is effective only when you use an experimental Tomcat version. |
181181
| `WEBSITE_DISABLE_JAVA_HEAP_CONFIGURATION` | Manually disable `WEBSITE_JAVA_MAX_HEAP_MB` by setting this variable to `true` or `1`. |
182182
| `WEBSITE_AUTH_SKIP_PRINCIPAL` | By default, the following Tomcat [HttpServletRequest interfaces](https://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/HttpServletRequest.html) are hydrated when you enable the built-in [authentication](overview-authentication-authorization.md): `isSecure`, `getRemoteAddr`, `getRemoteHost`, `getScheme`, `getServerPort`, `getLocalPort`, `getRequestURL`. To disable it, set the value to `1`. |
183+
| `WEBSITE_AUTH_EXPIRED_SESSION_LOGOFF` | If a webapp uses EasyAuth, set this to `true` or `1` to force a redirect to the EasyAuth logout page if the session associated to a request has expired (e.g. for webapps running on Tomcat, this is defined by the element `session-timeout` in the file `web.xml`). |
183184
| `WEBSITE_SKIP_FILTERS` | To disable all servlet filters that App Service added, set to `1`. |
184185
| `IGNORE_CATALINA_BASE` | By default, App Service checks if the Tomcat variable `CATALINA_BASE` is defined. If not, it looks for the existence of `%HOME%\tomcat\conf\server.xml`. If the file exists, it sets `CATALINA_BASE` to `%HOME%\tomcat`. To disable this behavior and remove `CATALINA_BASE`, set this variable to `1` or `true`. |
185186
| `PORT` | Read-only. For Linux apps, the port that the Java runtime listens to in the container. |

articles/app-service/toc.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -463,23 +463,27 @@ items:
463463
href: invoke-openapi-web-app-from-azure-ai-agent-service.md
464464
- name: WebJobs
465465
items:
466-
- name: Overview
467-
href: overview-webjobs.md
466+
- name: Overview
467+
href: overview-webjobs.md
468+
- name: Background jobs best practices
469+
href: /azure/architecture/best-practices/background-jobs?toc=/azure/app-service/toc.json&bc=/azure/app-service/breadcrumb/toc.json
468470
displayName: WebJobs overview
469471
- name: WebJobs Quickstart
470472
href: quickstart-webjobs.md
471473
displayName: Create a scheduled WebJob
472474
- name: WebJobs Tutorial
473-
href: tutorial-webjobs.md
474-
displayName: Prepare and schedule a WebJob
475-
- name: WebJobs How-to
475+
href: tutorial-webjobs.md
476+
displayName: Prepare and schedule a WebJob
477+
- name: How to create WebJobs
476478
href: webjobs-create.md
479+
- name: How WebJobs work
480+
href: webjobs-execution.md
477481
- name: Develop WebJobs using VS
478482
href: webjobs-dotnet-deploy-vs.md
479483
- name: Get started with WebJobs SDK
480484
href: webjobs-sdk-get-started.md
481485
- name: Use WebJobs SDK
482-
href: webjobs-sdk-how-to.md
486+
href: webjobs-sdk-how-to.md
483487
- name: Reliability
484488
items:
485489
- name: Reliability in Azure App Service

0 commit comments

Comments
 (0)