Skip to content

Commit 3db95c0

Browse files
Merge pull request #303812 from msangapu-msft/webjobs
webjobs note
2 parents e7da63d + 32a30ff commit 3db95c0

File tree

5 files changed

+56
-27
lines changed

5 files changed

+56
-27
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
author: msangapu-msft
3+
ms.service: azure-app-service
4+
ms.topic: include
5+
ms.date: 08/04/2025
6+
ms.author: msangapu
7+
---
8+
> [!IMPORTANT]
9+
> WebJobs aren't supported in custom Linux containers based on Alpine Linux, including Linux apps using Java 8 and Java 11 runtime stacks. Starting with Java 17 Linux apps, Azure App Service uses non-Alpine based images, which are compatible with WebJobs.
10+
>

articles/app-service/includes/webjobs-create/webjob-types.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ ms.author: msangapu
88

99
### <a name="acceptablefiles"></a>Supported file types for scripts or programs
1010

11+
[!INCLUDE [alpine note](alpine-note.md)]
12+
1113
### [Windows code](#tab/windowscode)
1214

1315
The following file types are supported:
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
author: msangapu-msft
3+
ms.author: msangapu
4+
ms.topic: include
5+
ms.date: 08/04/2025
6+
ms.service: azure-app-service
7+
ms.subservice: web-apps
8+
---
9+
10+
<a name="webjobs-supported-note" ></a>
11+
12+
## Supported platforms and file types
13+
14+
[!INCLUDE [alpine note](alpine-note.md)]
15+
16+
WebJobs are supported on the following App Service hosting options:
17+
18+
- Windows code
19+
- Windows containers
20+
- Linux code
21+
- Linux containers
22+
23+
Supported file/script types include:
24+
25+
- Windows executables and scripts: `.exe`, `.cmd`, `.bat`
26+
- PowerShell scripts: `.ps1`
27+
- Bash scripts: `.sh`
28+
- Scripting languages: Python (`.py`), Node.js (`.js`), PHP (`.php`), F# (`.fsx`), Java (`.jar`, `.war`)
29+
- Any language runtime included in your container app
30+
31+
This versatility enables you to integrate WebJobs into a wide range of application architectures using the tools and languages you're already comfortable with.

articles/app-service/overview-webjobs.md

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,9 @@ WebJobs come in three main types:
4242
- **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).
4343
- **Continuous WebJobs**: Run persistently in the background while your App Service app is running. Ideal for queue polling or background monitoring tasks.
4444

45-
4645
:::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.":::
4746

48-
## Supported platforms and file types
49-
50-
WebJobs are supported on the following App Service hosting options:
51-
52-
- Windows code
53-
- Windows containers
54-
- Linux code
55-
- Linux containers
56-
57-
Supported file/script types include:
58-
59-
- Windows executables and scripts: `.exe`, `.cmd`, `.bat`
60-
- PowerShell scripts: `.ps1`
61-
- Bash scripts: `.sh`
62-
- Scripting languages: Python (`.py`), Node.js (`.js`), PHP (`.php`), F# (`.fsx`)
63-
- Any language runtime included in your container app
64-
65-
This versatility enables you to integrate WebJobs into a wide range of application architectures using the tools and languages you're already comfortable with.
47+
[!INCLUDE [webjobs supported platforms and file types](./includes/webjobs-create/webjobs-supported-platforms.md)]
6648

6749
## Deployment options
6850

@@ -77,15 +59,15 @@ WebJobs also provide **built-in logging** via Kudu and integration with App Serv
7759

7860
## Scaling considerations
7961

80-
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:
62+
WebJobs scale together with your App Service plan. If your app is configured to scale out to multiple instances, your WebJobs run on each instance as appropriate:
8163
- **Triggered WebJobs** will run on a single instance by default.
8264
- **Continuous WebJobs** can be configured to run on all instances or a single one using the `WEBJOBS_RUN_ONCE` setting.
8365

8466
If you need independently scalable or event-driven execution, [Azure Functions](../azure-functions/functions-overview.md) may be more appropriate.
8567

8668
## Best practices
8769

88-
- Use **triggered** WebJobs for ad hoc or scheduled operations.
70+
- Use **triggered** WebJobs for improvised or scheduled operations.
8971
- Use **continuous** WebJobs only when the task needs to run constantly (e.g., polling a queue).
9072
- Implement **retry logic and error handling** within your scripts.
9173
- Use **application logging** and **Kudu logs** to monitor job behavior.
@@ -103,8 +85,8 @@ If you need independently scalable or event-driven execution, [Azure Functions](
10385

10486
## <a name="NextSteps"></a> Next steps
10587

106-
- [Background jobs best practices – Azure Architecture Center](/azure/architecture/best-practices/background-jobs)
88+
- [Review background jobs best practices – Azure Architecture Center](/azure/architecture/best-practices/background-jobs)
10789
- [Develop WebJobs using Visual Studio](webjobs-dotnet-deploy-vs.md)
10890
- [Get started with the WebJobs SDK](webjobs-sdk-get-started.md)
10991
- [Use the WebJobs SDK to build advanced jobs](webjobs-sdk-how-to.md)
110-
- [Kudu WebJobs reference on GitHub](https://github.com/projectkudu/kudu/wiki/WebJobs)
92+
- [Review Kudu WebJobs reference on GitHub](https://github.com/projectkudu/kudu/wiki/WebJobs)

articles/app-service/tutorial-webjobs.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ node webjob.js
235235

236236
WebJobs is a feature of Azure App Service that enables you to run a program or script in the same instance as a web app. All app service plans support WebJobs at no additional cost. This sample uses a scheduled (Triggered) WebJob to output the system time once every minute.
237237

238+
> [!IMPORTANT]
239+
> WebJobs aren't supported in custom Linux containers based on Alpine Linux, including Linux apps using Java 8 and Java 11 runtime stacks. Starting with Java 17 Linux apps, Azure App Service uses non-Alpine based images, which are compatible with WebJobs.
240+
>
241+
238242
## Prerequisites
239243
240244
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio).
@@ -267,13 +271,13 @@ public class HelloWorld {
267271
268272
### Build the Java WebJob
269273
270-
1. The `run.sh` script runs a jar with the name that set in the Maven configuration. This script will run when our WebJob is triggered.
274+
1. The `run.sh` script runs a jar with the name that sets in the Maven configuration. This script runs when our WebJob is triggered.
271275
272276
```bash
273277
java -jar webjob-artifact-1.0.0.jar
274278
```
275279
276-
1. Next, we compile the Java project to produce the executable `.jar`. There are multiple ways to do this, but for this example, we’ll use Maven. Run the following commands from the `project/` directory:
280+
1. Next, we compile the Java project to produce the executable `.jar`. There are multiple ways to do this, but for this example, we use Maven. Run the following commands from the `project/` directory:
277281
278282
```bash
279283
mvn install
@@ -318,7 +322,7 @@ public class HelloWorld {
318322

319323
:::zone target="docs" pivot="php"
320324

321-
WebJobs is a feature of Azure App Service that enables you to run a program or script in the same instance as a web app. All app service plans support WebJobs at no additional cost. This sample uses a scheduled (Triggered) WebJob to output the system time once every minute.
325+
WebJobs is a feature of Azure App Service that enables you to run a program or script in the same instance as a web app. All app service plans support WebJobs at no extra cost. This sample uses a scheduled (Triggered) WebJob to output the system time once every minute.
322326

323327
## Prerequisites
324328

@@ -329,7 +333,7 @@ WebJobs is a feature of Azure App Service that enables you to run a program
329333

330334
## Download the sample WebJob
331335

332-
You can [download a pre-built sample project](https://github.com/Azure-Samples/App-Service-PHP-WebJobs-QuickStart/archive/refs/heads/main.zip) to get started quickly. The sample includes two files: `webjob.php` and `run.sh`.
336+
You can [download a prebuilt sample project](https://github.com/Azure-Samples/App-Service-PHP-WebJobs-QuickStart/archive/refs/heads/main.zip) to get started quickly. The sample includes two files: `webjob.php` and `run.sh`.
333337

334338
The PHP script, `webjob.php`, outputs the current time to the console as shown below:
335339

0 commit comments

Comments
 (0)